Re: Files passing through

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux