Posted by Sjoerd on 12/05/05 21:37
Why do you need this? What do you want to do? Do you want to
recursively walk trough directories? In that case, here is an example:
function traverse($dir) {
$dh = opendir($dir);
while ($file = readdir($dh)) {
if ($file{0} == '.') continue;
$path = $dir.'/'.$file;
if (is_file($path)) {
echo $file."\n";
} else {
traverse($path);
}
}
closedir($dh);
}
[Back to original message]
|