dir

It return an instance of the Directory class

Example

<?php
$dir = dir(“/var/www/test/date/”);
echo “Handle: ” . $dir->handle . “<br />”;
echo “Path: ” . $dir->path . “<br />”;
while (($val = $dir->read())  !== false) {
echo $val.”<br />”;
}
$dir->close();
?>

Output

Handle: Resource id #3
Path: /var/www/test/date/
index.php
enc.php
..
.

Share