You are here: Re: The best method to send a large file to client? « PHP Programming Language « IT news, forums, messages
Re: The best method to send a large file to client?

Posted by Colin McKinnon on 10/05/06 19:57

Arjen wrote:

> howachen@gmail.com schreef:
>> I have many text file with 1 to 2MB in size
>>
>> currently, i use the method:
>>
>> echo file_get_contents( $file_path );
>>
>>
>> are there any better method?
>>
>> thanks.
>
> Yup .. stream the file.
>
> file($file_path);

You'll run out of memory very quickly using file(...) or
file_get_contents(...) on big files.

C.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация