note 19366 rejected from function.fread by zak

From: Date: Mon, 25 Feb 2002 19:48:07 +0000
Subject: note 19366 rejected from function.fread by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-27019@lists.php.net to get a copy of this message
Somebody alluded to it above, but for some reason I had the same problem opening and reading a file from the local file system, not a URL. This does not work: -- $file=fopen("suite/search/noisewords.inc","rb"); $noisewords=fread($file,filesize($file)); -- But this does: -- $file=fopen("suite/search/noisewords.inc","rb"); $noisewords=fread($file,90000); -- I just switched servers and had never had this problem before using filesize(), even though I am still on an Apache on Linux, but for some reason it was spitting out the following error: Warning: stat failed for Resource id #14 (errno=2 - No such file or directory) in /home/univers/public_html/blahblahblah/searchfunctions.php on line 8

« previous php.notes (#27019) next »