note 10724 added to readdir
| From: | rabbit at cownow dot com | Date: | Fri, 19 Jan 2001 01:17:03 +0000 |
| Subject: | note 10724 added to readdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9948@lists.php.net to get a copy of this message | ||
For Example 2: DO SOME CHECKING!
Using the code as written above is a great way to fill up the partition holding your log files if
you mess up the directory you're trying to open. It'll take but a minute, depending on
your free space, because the while loop checks as fast as it can!
Make the first line this, instead:
if ($handle=opendir('../local/include/language')) {
# (rest of example 2)
}
http://www.php.net/manual/en/function.readdir.php