Re: Strange is_dir() behavior
| From: | Edward Vermillion | Date: | Sat, 25 Jun 2005 15:07:33 +0000 |
| Subject: | Re: Strange is_dir() behavior | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217611@lists.php.net to get a copy of this message | ||
On Jun 25, 2005, at 8:34 AM, Marcos Mendonça wrote:
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/What do you get if you just echo out $entry without the if() statement? Do you get a list of the directories you'd expect? Edward Vermillion evermillion@doggydoo.netfolder1 folder2 folder3 ... and so onI'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?