Re: download
| From: | Chris Hewitt | Date: | Tue, 11 Jun 2002 16:17:02 +0000 |
| Subject: | Re: download | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101567@lists.php.net to get a copy of this message | ||
Kris,
If I understand what you mean correctly, this is just an ordinary anchor (nothing to do with php). For example,
<a href="http://mybox.domain.com/myfile.xls">Click to download</a>
When clicked, if ".xls" is in /etc/mime.types as
"application/vnd.ms-excel .xls" then it will either download or start up the Excel application, depending upon the setting of the user's browser. If not in /etc/mime.types, it will probably try to display the file in the browser, depending upon the setting of DefaultType in httpd.conf.Hope this helps. Chris Kris Vose wrote:
are there any php functions that handle downloads. For Instance I want to create a link that contains a url string. In this string a variable is defined as a file. This file will be downloaded when the user clicks on the link. How do you handle this file in php? Is there a function that will do this. I have tried the copy function but it does not seems to work. Kris