Files without type???
| From: | Morten Winkler Jørgensen | Date: | Wed, 18 Apr 2001 06:23:30 +0000 |
| Subject: | Files without type??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-49128@lists.php.net to get a copy of this message | ||
Hi php'ers
Executing the following code on my Redhat 7.2 box, through Apache i
get the most annoying output:
Code:
function listDirectory($basedir){
$diary_directory = opendir($basedir);
while($filename = readdir($diary_directory)) {
if(strcmp(".", $filename) != 0) {
if(strcmp("..", $filename) != 0) {
print("<br>$filename is \"");
print filetype($filename)."\"";
}
}
}
closedir($diary_directory);
}
listDirectory(".");
Output (sample):
index.php is "" (should be "file")
Ansatte is "" (should be "dir")
Produkter is "" (should be "dir")
Kontorer is "dir"
view.php3 is "" (should be "file")
What could possibly be the error?
Kind regards,
Morten Winkler