Bug #17610 Updated: listing file with readdir
| From: | sander@php.net | Date: | Thu, 06 Jun 2002 08:21:07 +0000 |
| Subject: | Bug #17610 Updated: listing file with readdir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9600@lists.php.net to get a copy of this message | ||
ID: 17610
Updated by: sander@php.net
Reported By: sfarran@centrimage.com
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: linux mandrake 8.1
PHP Version: 4.1.2
New Comment:
You should use while(($iden_dir = @readdir($directory_src))!==false)
Read the docs.
Previous Comments:
------------------------------------------------------------------------
[2002-06-05 08:28:16] sfarran@centrimage.com
When I do a readdir in a directory, Php forget some files
My directory have about 3000 files
size of files: 1.4Mo
type: sgi (pictures)
name of files: quad.xxxx.sgi (xxxx is a number, ie 0001)
I've done tests on this directory, and listed files are never the same.
Sometimes, Php forget files, but forgotten files are not the same one
time to another.
Is there limits on the use if readir function?
my code for listing files is:
$directory_src = @opendir("/tmp");
while($iden_dir = @readdir($directory_src))
{
echo "$iden_dir<BR>";
}
@closedir($directory_src);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17610&edit=1