Forum Moderators: coopster
Warning: filesize() [function.filesize]: stat failed for 8192 in grabinfo.php on line 103Warning: fread() [function.fread]: Length parameter must be greater than 0. in grabinfo.php on line 103
This is line 103:
$text = fread($hi,filesize($myFile));
Now, as I am still learning, isnt filesize($myfile) supposed to get the size from the file?
This script processes several large text files of varying sizes with some being fairly large. How can I avoid getting this error?
At first I thought it was due to the file not containing any text, but I checked it and it does indeed contain text.
Any help is appreciated.
stat failed for 8192
I would try dumping the $myFile variable out to see what is in it, looks like an integer to me, not a (string) filename. filesize() expects a string filename as the only parameter.
int filesize [php.net] ( string filename )