Re: handling large files w/readfile
| From: | Curt Zirzow | Date: | Fri, 31 Dec 2004 18:02:39 +0000 |
| Subject: | Re: handling large files w/readfile | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205453@lists.php.net to get a copy of this message | ||
* Thus wrote Richard Lynch:
> Sebastian wrote:
> > 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?
>
> I don't know if it's STILL true (or ever was) that readfile() would suck
> the whole file into RAM before spitting it out... Seems real unlikely,
> but...
Never was and still isn't.
using either readfile or fpassthru is the best route.
Curt
--
Quoth the Raven, "Nevermore."