Women in Technology

Hear us Roar

  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:


instead of: