note 19338 added to ref.dir
| From: | avbentem at php2 dot chek dot com | Date: | Sun, 24 Feb 2002 09:06:45 +0000 |
| Subject: | note 19338 added to ref.dir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26981@lists.php.net to get a copy of this message | ||
The user annotation above it not correct: one should really use 'identical' to check for
FALSE, as a directory may be named FALSE as well...
Thus:
while ($file = readdir($handle))
should read
while (false !== ($file = readdir($handle)))
See http://www.php.net/manual/en/function.readdir.php
Arjan.
--
http://www.php.net/manual/en/ref.dir.php
http://master.php.net/manage/user-notes.php?action=edit+19338
http://master.php.net/manage/user-notes.php?action=delete+19338
http://master.php.net/manage/user-notes.php?action=reject+19338