Page 1 of 1

problem with fread

Posted: Wed Aug 03, 2005 7:56 pm
by winsonlee
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

Code: Select all

$myFile = "member.txt";
$fh = fopen($myfile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);

Posted: Wed Aug 03, 2005 8:02 pm
by feyd
fopen() failed.