5 function dir_scan($directory, $slash="/") {
7 if($GLOBALS["num"] == 0) echo("<title>$directory</title>\n<h1><a href=\"file:///$directory\">$directory</a></h1>\n");
8 $files=opendir ($directory);
9 while (false!==($file = readdir($files)))
11 if ($file != "." && $file != "..")
13 if(is_dir($directory.$file)) echo("[DIR] ");
14 //echo "$directory$file\n";
15 echo "<a href=\"file:///$directory$file\">$directory$file</a>\n";
16 $GLOBALS["num"] = ($GLOBALS["num"] +
1);
17 if(is_dir($directory.$file)) dir_scan($directory.$file.$slash,$slash);
24 ///CODE////////////////////////
26 dir_scan("x:\\", "\\");
27 echo("\nTotal: $num\n");
This page took 0.828726 seconds and 4 git commands to generate.