note 74595 deleted from ref.dir by bjori
| From: | bjori@php.net | Date: | Fri, 20 Apr 2007 09:14:26 +0000 |
| Subject: | note 74595 deleted from ref.dir by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125591@lists.php.net to get a copy of this message | ||
Note Submitter: mares at mail dot od dot ua
Reason: useless
----
Just another simple "directory walker":
<?php
function dirwalker($root_dir) {
global $files;
$dir = opendir($root_dir.'/');
while ($f = readdir($dir)) {
if ($f <> '.' && $f <> '..') {
if (is_dir($root_dir.'/'.$f)) {
dirwalker($root_dir.'/'.$f);
} else {
$files[] = $root_dir.'/'.$f;
};
};
};
closedir($dir);
};
dirwalker('.');
foreach($files as $filename) {
echo($filename.'<br>');
};
?>
Have a good day! :)