Forum Moderators: coopster
Line44 =
while($file=$d->read()){ The relevant code is:
/* If you're including this script from a function, you'll need
to make $SCRIPT_FILENAME a global variable. */
if (!$SCRIPT_FILENAME)
global $SCRIPT_FILENAME;
// We'll have to loop through all the files in the current directory
$d = dir(dirname($SCRIPT_FILENAME));
while($file=$d->read()){
any ideas suggestions appreciated
many Thanks
[edited by: ergophobe at 10:50 pm (utc) on Nov. 7, 2004]
Basically, what this means, is that $d is not an object. Since dir() should create a pseudo-object, I would guess that means that the directory read failed.
Is there a chance that the path in $SCRIPT_FILENAME is not valid?
Note also that the manual [php.net] does the condition checking in the while loop as follows
while (false!== ($entry = $d->read()))
for reasons explained there
Tom