note 7659 deleted from function.filesize by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 20:14:58 +0000 |
| Subject: | note 7659 deleted from function.filesize by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22710@lists.php.net to get a copy of this message | ||
This might help for filesize on a remote server.. from faqts.com
<pre>
Loop using fread and check for eof with a predefined buffersize (example using 1000 bytes buffer)
$fp = fopen ($picture_name, "r");
while (!feof($fp))
{
$contents .= fread($fp, 1000);
}
fclose($fp);
print "filseize: " . strlen($contents) . "<br>";
$fp2 = fopen ("c:/temp/test.gif","w");
fwrite($fp2,$contents,strlen($contents));
fclose($fp2);
</pre>