problem:
A very simple directory listing isnt pulling all the files and I'm pulling my hairs trying to figure out why:
function DirReader($dir){
if ($handle=opendir($dir)){
while($file = readdir($handle)){
if (is_file($file)) echo "<b>".$dir."/</b>".$file." is a file<br><br>";
elseif ((is_dir($file)) && (trim(str_replace(".", "",$file)) !== "")) {
DirReader($dir."/".$file);
}
}
}
}
DirReader(".");
As you can see, not much to the code, but it seems to only pull 1 or 2 files, perhaps until it finds a directory, on any given directory.
typical readout:
./file.php is a file
./index.php is a file
./ext/index.php is a file
./file2.php is a file
when the ext/ has alot more files then listed