note 58273 deleted from function.fread by aidan
| From: | aidan@php.net | Date: | Sat, 29 Oct 2005 23:51:47 +0000 |
| Subject: | note 58273 deleted from function.fread by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-97818@lists.php.net to get a copy of this message | ||
Note Submitter: rfriedel at beachsidehosting dot com
Reason: useless
----
I have found that putting the actual filesize as the int length is better than 8192 as some examples
have shown...
<?php
$filename = "examplefile.txt";
$handle = fopen($filename, "rb");
if ($handle) {
while (!feof($handle)) {
$contents .= fread($handle, filesize($filename));
}
}
fclose($handle);
?>