Re: Files passing through
| From: | Jasper Bryant-Greene | Date: | Tue, 23 Aug 2005 07:48:07 +0000 |
| Subject: | Re: Files passing through | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221148@lists.php.net to get a copy of this message | ||
Kim Steinhaug (php list) wrote:
I'm using this method, works fine with 50mb+ files :
if( $fd = fopen ($filepath, 'r')){
while(!feof($fd)) {
$buffer = fread($fd, 2048);
print $buffer;
}
fclose ($fd);
exit;
}
Is there a reason why you assign the output of fread() to a variable and then print it? Why not just:
print(fread($fd, 2048));
which would be faster because it doesn't need to assign to a variable, wouldn't it? Maybe I'm missing something..
Jasper