<?php
//====================================
// Example
//====================================
include_once('DirOperator.php');
$d = new DirOperator();
// Use subdirectories.
$d -> setSubDir();
// Print out contents, only html, htm and .gif files + exclude phpMyAdmin directory.
print_r($d -> output('./', "(htm|html|gif)\$", "(phpMyAdmin)"));
print '<hr>';
// Reset object
$d -> reset();
// We're not fussy! include all files and all directories.
print_r($d -> output('./'));
// Create a directory
$d -> create("./testdir");
print '<hr>';
// Reset object
$d -> reset();
// Include directories with output
$d -> showDir();
print_r($d -> output('./'));
// Delete a directory
$d -> delete("./testdir");
?>
|