PHP going mad.. PLEASE HELP!
Posted: Fri Aug 16, 2002 4:47 pm
Right then..
I have an array of names called
$NAMES
with 5 names in it.
I generate a random number
$NUMBER = rand(0, 4);
I set a variable contain a random name pulled from the array
$randomNAME = $NAMES[$NUMBER];
I then create a variable containing a path to a file
$namePATH="People/$randomNAME/pictures/info.txt";
Now.. when I try to open this file (and it DOES exsist) PHP screams at me saying it DOESN'T exsist!!!
I open the file like this
$openFILE = fopen($namePATH, "r");
$personsINFO = fread($openFILE, filesize($namePATH));
fclose($openFILE);
I'm confused.
Can anyone help with this?!?!
I have an array of names called
$NAMES
with 5 names in it.
I generate a random number
$NUMBER = rand(0, 4);
I set a variable contain a random name pulled from the array
$randomNAME = $NAMES[$NUMBER];
I then create a variable containing a path to a file
$namePATH="People/$randomNAME/pictures/info.txt";
Now.. when I try to open this file (and it DOES exsist) PHP screams at me saying it DOESN'T exsist!!!
I open the file like this
$openFILE = fopen($namePATH, "r");
$personsINFO = fread($openFILE, filesize($namePATH));
fclose($openFILE);
I'm confused.
Can anyone help with this?!?!