Strange is_dir() behavior
| From: | Marcos Mendonça | Date: | Sat, 25 Jun 2005 13:34:08 +0000 |
| Subject: | Strange is_dir() behavior | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-217606@lists.php.net to get a copy of this message | ||
Hello
I'm using PHP 4.3.9, under Windows XP with Apache.
I have the following directory structure on a given app, i'm working on.
photos/
> folder1
> folder2
> folder3
> ... and so on
I'm trying the following code to make a list of folder under photos:
$d = dir('photos/');
while (false !== ($entry = $d->read())) {
if (is_dir($entry) && $entry != '.' && $entry != '..')
echo $entry . "<br />";
}
For some strange reason, that echoes nothing. is_dir is returning
false on every folder (dir)
under photos, except for '.' and '..' dirs. Can someone explain this?
Thanks ind advance.
Marcos