note 49870 added to function.rmdir
| From: | abhishekdotrataniatgmaildotcom at osu1 dot php dot net | Date: | Thu, 10 Feb 2005 21:23:07 +0000 |
| Subject: | note 49870 added to function.rmdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84812@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.rmdir.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49870
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49870&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49870&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49870&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49870&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49870&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49870&report=yes
Search -- http://master.php.net/manage/user-notes.php