Hello!

> i'm working on a app which output files with readfile() and some headers..
> i read a comment in the manual that says if your outputting a file php
> will
> use the same amount of memory as the size of the file. so, if the file is
> 100MB php will use 100MB of memory.. is this true?
>
> if it is, how can i work around this?

Do not use readfile() or file_get_contents() to read
the full file in one step. Read file in smaller chunks
to a buffer variable whith fread() and output that
immediately in the cycle. And again and again...
You can read terrabytes of data and utput them, the
amount of memory needed is based on your buffer size.

-- 
=============================================================
Heilig (Cece) Szabolcs - [EMAIL PROTECTED] - http://www.phphost.hu
=============================================================

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

Reply via email to