Re: download file question...
| From: | Torsten Roehr | Date: | Thu, 19 Aug 2004 22:02:16 +0000 |
| Subject: | Re: download file question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194290@lists.php.net to get a copy of this message | ||
"Bruce" <bedouglas@earthlink.net> wrote in message
news:082201c4861b$c8b74730$0301a8c0@Mesa.com...
> hi...
>
> i can allow files to be uploaded to my app. are there corresponding
> scripts/code to allow files to be downloaded to the user via the browser??
>
> just occurred to me that i'll want to do this...
>
> nothing jumps out at me searching google/php.net for this...
>
> thanks
What about pointing a link to the file?!?:
<a href="/path/to/your/file.pdf">link</a>
If the file is outside of the webroot root or in a protected directory you
can use PEAR's HTTP_Download:
http://pear.php.net/package/HTTP_Download
Regards, Torsten Roehr