Hi,
I am using a script to list all the files in a directory.
I want to put a "/" after the filename if it is a directory.
It can only recognize "." and ".." as directory, but fail
to report other directories. What's wrong with is_dir?
Thanks.
My script:
<?php
$dir=".";
$dh = opendir($dir);
while($file = readdir($dh)){
if(is_dir($file)){
print "$file /<br>";
}else{
print "$file <br>";
}
}
closedir($dh);
?>