Re: How do i provide Download facility ??
| From: | Chris Shiflett | Date: | Wed, 27 Nov 2002 06:19:23 +0000 |
| Subject: | Re: How do i provide Download facility ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126232@lists.php.net to get a copy of this message | ||
--- Venkatesh Hosur <vhosur@extentia.com> wrote:
> I was just looking around for information on Download
> of files using PHP. I need to provide link/button, by
> clicking which a user can download a file (Say a CSV
> file..)
The best solution, in my opinion, is just to use a straightforward
HTML link:
<a href="http://yourserver.org/foo.csv">Download
foo.csv</a>
The only caveat to this is that you must make the file available as a
URL, meaning it must be stored under document root.
If you instead want to have a PHP application decide whether the user
is allowed to download the file as a way to restrict access to it,
that's a different question. :-)
Chris