Bug #10856 Updated: is_dir() does only recognize . and .. as directory, nothing else

From: Date: Mon, 14 May 2001 18:18:56 +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-55209@lists.php.net to get a copy of this message
ID: 10856 Updated by: derick Reported By: marc@links2linux.de Old-Status: Open Status: Bogus Bug Type: Directory function related Operating system: PHP Version: 4.0.4pl1 Assigned To: Comments: 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 Previous Comments: --------------------------------------------------------------------------- [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

« previous php.dev (#55209) next »