note 25114 added to function.file-get-contents
| From: | zzzhong at remove_this_nospam dot yahoo dot com | Date: | Wed, 11 Sep 2002 08:36:54 +0000 |
| Subject: | note 25114 added to function.file-get-contents | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36500@lists.php.net to get a copy of this message | ||
some problems of previous code
1. file function is not binary save
2. filesize does not support url filename
i've tried this code to be work
function file_get_contents($filename) {
$fp = @fopen($filename, "r");
if (!($fp)) {
return 0;
}
while (!feof($fp)) {
$temp .= fread($fp, 4096);
}
return $temp;
}
--
http://www.php.net/manual/en/function.file-get-contents.php
http://master.php.net/manage/user-notes.php?action=edit+25114
http://master.php.net/manage/user-notes.php?action=delete+25114
http://master.php.net/manage/user-notes.php?action=reject+25114