Robert Cummings wrote:
It's because you have written sloppy code and didn't bother to
initialize $Dirs to an array. So it's default value is null. You would
know this if you had notices enabled.
Error fixed.
Also, the other problem is that you are either a) opening the wrong
path, b) the path you are opening has no files or directories.
Neither of those assumptions is correct.
Take note also that your variable is called $Dirs, but readdir() returns
all directory contents (including files, links, etc, etc).
I'm aware of what readdir() returns, and also aware that in my
particular application, it makes no difference what so ever since there
are only directories in there. If it also contained individual files, I
would've named it different. Variable names are exactly that, variable
names. Whether I called it $Dirs or $Robert_Cummings would make no
difference what so ever [to me]. But thank you for your opinion.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php