Re: implementing downloads with php?
| From: | Christoph Becker | Date: | Fri, 03 Apr 2015 11:01:32 +0000 |
| Subject: | Re: implementing downloads with php? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324766@lists.php.net to get a copy of this message | ||
Jeffry Killen wrote:
>
> On Apr 2, 2015, at 6:33 PM, Sean Greenslade wrote:
>> A quick google turned up this result:
>>
>>
>> http://stackoverflow.com/questions/8485886/force-file-download-with-php-using-header
>
> a bunch of headers are sent and then the file is read. But I don't see a
> print or echo statement
> in any of the code in the related posts.
readfile() does not only read a file, but also echoes it. See its
manual page[1], where you also find an example for downloading a file.
[1] <http://php.net/manual/function.readfile.php>
--
Christoph M. Becker