note 42584 deleted from function.file-get-contents by tomsommer

From: Date: Mon, 31 May 2004 23:30:02 +0000
Subject: note 42584 deleted from function.file-get-contents by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-70372@lists.php.net to get a copy of this message
Note Submitter: mattsoft@mattsoft.net ---- if($filedata=file_get_contents($full_path)){ ... } I use this in a script because it loads large files a lot faster then fopen with a loop, but I found that if the file it's reading is empty, it returns false. here is what I did to fix the problem. if(is_readable($full_path)){ $filedata=file_get_contents($full_path); ... }

« previous php.notes (#70372) next »