added PKGBUILD for openssh-dnssec
[mirrors/Programs.git] / php / skripty / find_recursive.php
1 <pre>
2 <?php
3
4 //
5 function dir_scan($directory, $slash="/") {
6
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)))
10 {
11 if ($file != "." && $file != "..")
12 {
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);
18 }
19 }
20 closedir($files);
21
22 }
23
24 ///CODE////////////////////////
25 $num = "0";
26 dir_scan("x:\\", "\\");
27 echo("\nTotal: $num\n");
28 ?>
29 </pre>
This page took 0.828726 seconds and 4 git commands to generate.