Bug #16257 Updated: is_dir enters infinite loop
| From: | denissov at hotmail dot com | Date: | Mon, 25 Mar 2002 15:36:50 +0000 |
| Subject: | Bug #16257 Updated: is_dir enters infinite loop | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-3298@lists.php.net to get a copy of this message | ||
ID: 16257
Updated by: denissov@hotmail.com
Reported By: denissov@hotmail.com
-Status: Feedback
+Status: Open
Bug Type: Directory function related
Operating System: Windows 98
PHP Version: 4.0.6
New Comment:
I have manually set windows swapfile to another partition than C:. In
the root I have a file called Win386.swp and when I try to list the
root dir... well, here's the code:
$dir = "/";
print_r(listDir($dir));
function listDir ($dir=".") {
$thisDir = opendir($dir);
while($d = readdir($thisDir)) {
if (is_dir("$dir/$d")) {
$listDirs[] = $d;
}
}
return $listDirs;
}
Previous Comments:
------------------------------------------------------------------------
[2002-03-25 08:47:45] sander@php.net
Can you provide a sample script?
------------------------------------------------------------------------
[2002-03-25 07:32:52] denissov@hotmail.com
That happens when you want to check if the windows' swapfile is a
ehm... a dir.
I'm using php 4.0.6 with Apache.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16257&edit=1