Re: trigger download with left-click?
| From: | Marek Kilimajer | Date: | Tue, 17 Jun 2003 11:12:34 +0000 |
| Subject: | Re: trigger download with left-click? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151817@lists.php.net to get a copy of this message | ||
Provide a download link which would link to a download.php file. In this file output
header('Content-type: application/octet-stream');
and then readfile(); the desired file.
REMEMBER to check if it is realy a file that the user can see, otherwise anybody can download your php scripts (and maybe even other files) too.
Sam Folk-Williams wrote:
Hi, I have a site with hundreds of downloadable forms in MS Word format. Right now to download a form you have to right-click and choose "Save Target As..." to download the form. Is there a simple script that I could put in that would trigger the download with a left-click? (The end users are not very savy and are having a hard time with the "Save target as..." concept). Thanks for your help, Sam