note 49870 deleted from function.rmdir by aidan
| From: | aidan@php.net | Date: | Tue, 15 Feb 2005 03:43:56 +0000 |
| Subject: | note 49870 deleted from function.rmdir by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85046@lists.php.net to get a copy of this message | ||
Note Submitter: abhishek dot ratani at gmail dot com
----
Regarding the code posted by agotterer. This is the correct way to do it. The while loop should be
changed to,
while (false !== ($file=readdir($dh)))
This would consider all the files that would evaluate to false like a file named 0 or directory
named 0.