We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
Working with Files in PHP, Part 3
|
| Subject: |
|
While loop args are incorrect |
| Date: |
|
2005-01-20 07:45:04 |
| From: |
|
stevelux
|
|
|
|
couldn't get it to work so I consulted the PHP man.
Where you have:
while ($file = $mydir->read()) !== false)
should be:
while (false !== ($file = readdir($mydir)))
That's what made it work for me. Please note that that I used:
readdir()
instead of:
read()
|