<?php
function ListingDirectory($path) {
if (is_dir($path))
{
if ($dh = @opendir($path)) {
while (($file = readdir($dh)) !== false) {
if (($file != '.') && ($file != '..') && ($file != '...'))
if (is_dir($path . $file))
ListingDirectory($path . $file . '/');
else echo $path . $file.'<br>';
}
closedir($dh);
}
}
elseif (is_file($path)) echo $path.'<br>';
}
$directory = "./docs/";
ListingDirectory($directory);
?>