problem with fread
Posted: Wed Aug 03, 2005 7:56 pm
some how i just couldnt figure out whats wrong with this code. i follow the example exactly as how it it. but i still get this error.
Warning: fread(): supplied argument is not a valid stream resource in C:\Web\project\dropdown.php on line 27
Warning: fclose(): supplied argument is not a valid stream resource in C:\Web\project\dropdown.php on line 28
Warning: fread(): supplied argument is not a valid stream resource in C:\Web\project\dropdown.php on line 27
Warning: fclose(): supplied argument is not a valid stream resource in C:\Web\project\dropdown.php on line 28
Code: Select all
$myFile = "member.txt";
$fh = fopen($myfile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);