Why do I et this error
Warning: stat failed for Resource id #1 (errno=2 - No such file or directory) in /webspace/dark-street.com/html/test/stoordata.php on line 19
when using this piece of code:
$CNfp = fopen("curnum.txt", "r") or die("Cannot open file!");
$data = fread($CNfp, filesize($CNfp));
while(!feof($CNfp))
{
$data .= fgets($CNfp, 1024); //read cur num in
}
fclose($CNfp);
$values = explode("\r\n", $data); //num is in array var values[0]
BTW line 19 refers to the line that starts with $data=fread...
And yes, I do have a file called curnum.txt in the same dir and its permissions are set to 777.when using file size you actually put the filename as a string, not the open file stream.
filesize("curnum.txt")Nevermind. I got it to work.
Warning: stat failed for Resource id #1 (errno=2 - No such file or directory) in /webspace/dark-street.com/html/test/stoordata.php on line 19
when using this piece of code:
$CNfp = fopen("curnum.txt", "r") or die("Cannot open file!");
$data = fread($CNfp, filesize($CNfp));
while(!feof($CNfp))
{
$data .= fgets($CNfp, 1024); //read cur num in
}
fclose($CNfp);
$values = explode("\r\n", $data); //num is in array var values[0]
BTW line 19 refers to the line that starts with $data=fread...
And yes, I do have a file called curnum.txt in the same dir and its permissions are set to 777.when using file size you actually put the filename as a string, not the open file stream.
filesize("curnum.txt")Nevermind. I got it to work.