Bug #10856 Updated: is_dir() does only recognize . and .. as directory, nothing else
| From: | derick@php.net | Date: | Mon, 14 May 2001 18:32:50 +0000 |
| Subject: | Bug #10856 Updated: is_dir() does only recognize . and .. as directory, nothing else | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-55212@lists.php.net to get a copy of this message | ||
ID: 10856
Updated by: derick
Reported By: marc@links2linux.de
Status: Bogus
Bug Type: Directory function related
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
Ok, I bumbed up the error level from E_NOTICE to E_WARNING.
Derick
Previous Comments:
---------------------------------------------------------------------------
[2001-05-14 14:18:56] derick@php.net
Hello,
this is a little error in your logic,
$d->read() returns a string, and the is_dir() only checks in the _current_ directory for that
string.
Aparrantly you don't have (p.e.) bin in your current dir, so is_dir() failed on it.
I'm checking if I can make this a warning, but I'm closing this report now, because
it's not a bug.
Derick
---------------------------------------------------------------------------
[2001-05-14 14:04:48] marc@links2linux.de
$d = dir("/");
echo "Handle: ".$d->handle."<br>n";
echo "Path: ".$d->path."<br>n";
while($entry=$d->read()) {
if (is_dir($entry)) echo "[DIR]";
echo $entry."<br>n";
}
$d->close();
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10856&edit=2