A-L-P-H-A
public text v1 · immutable<?php
function parse_dir($dir) {
if ($dh = @opendir($dir)) {
while(($file = readdir($dh)) !== false) {
if( !preg_match('/^\./s', $file) ) {
if(is_dir($dir.$file)) {
$newdir = $dir.$file.'/'; // <- tailing slash
chdir($newdir);
echo "IS DIR: $newdir<br/>\n";
echo parse_dir($newdir);
}
}
}
chdir('..');
}
}
parse_dir('e:/uploads/');
?>