Bug #13890 Updated: Docu-Error at opendir()
| From: | philip@php.net | Date: | Wed, 07 Nov 2001 19:26:45 +0000 |
| Subject: | Bug #13890 Updated: Docu-Error at opendir() | ||
| References: | 1 | Groups: | php.dev php.doc |
| Request: | Send a blank email to php-dev+get-69771@lists.php.net to get a copy of this message | ||
ID: 13890
Updated by: philip
Reported By: hannes.dorn@ibit.at
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System: Windows 2000
PHP Version: 4.0.6
New Comment:
fixed and now closed :)
Previous Comments:
------------------------------------------------------------------------
[2001-11-07 14:25:00] philip@php.net
Fixed.
------------------------------------------------------------------------
[2001-10-31 15:14:15] hannes.dorn@ibit.at
Related File: chm
"This file was generated: Thu Jul 26 22:28:30 2001"
In opendir() docu, it says:
if ($dir = @opendir("/tmp")) {
while($file = readdir($dir)) {
echo "$file\n";
}
closedir($dir);
}
The while statement stops wenn a filename contains only of a "0". In readdir() the docu is
correct.
$handle=opendir('.');
echo "Directory handle: $handle\n";
echo "Files:\n";
while (($file = readdir($handle))!==false) {
echo "$file\n";
}
closedir($handle);
Note the !== false in the while statement.
Rasty
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13890&edit=1