Re: how to provide download of files mow in documentroot

From: Date: Tue, 30 Mar 2010 15:27:48 +0000
Subject: Re: how to provide download of files mow in documentroot
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-303621@lists.php.net to get a copy of this message
Jan G.B. wrote: > I was recommending other file methods like fopen() combinations, > fpassthru() and at best readfile(). All of them do not buffer the > whole file in memory. > > http://php.net/readfile > http://php.net/fpassthru ahh so you were; completely missed that, apologies - readfile's the one and good advice. still keen to point out that if you don't need any other features from php then why use php when webserver will do the job perfectly well - primary reason for me mentioning this is to take advantage of the cache control / etag / last modified etc (most php scripts just return 200 ok repeatedly) regards

« previous php.general (#303621) next »