Re: Files passing through

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

 



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;
    }

Regards,
Kim Steinhaug
- - - - - - - - -
www.easycms.no

----- Original Message ----- 
From: "Evert | Rooftop" <evert@xxxxxxxxxxxxxxxxxxx>
To: "PHP-Users" <php-general@xxxxxxxxxxxxx>
Sent: Monday, August 22, 2005 9:30 PM
Subject:  Files passing through


> Hi People,
> 
> I want to use a PHP script to pass through a file to the browser [ right 
> after some processing ].
> What is the fastest way to do this? I know 
> echo(file_get_contents('myfile')); is not a good idea ;)
> 
> Is fpassthrough the right choice?
> maybe virtual, so it won't go through php but apache does the job?
> there's also readfile
> 
> Another question, how seriously does this affect the performance in 
> comparison to let apache handle it. Is the difference big at MB+ files? 
> or only significant when dealing with a lot of tiny files?
> 
> Thanks for your help!
> Evert
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

-- 
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