Re: OT - How to code a link to download a file (program file)
| From: | Richard Lynch | Date: | Mon, 26 Mar 2007 20:06:09 +0000 |
| Subject: | Re: OT - How to code a link to download a file (program file) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-251412@lists.php.net to get a copy of this message | ||
On Mon, March 26, 2007 2:49 pm, Rahul Sitaram Johari wrote:
> header("Content-Type: application/force-download");
header("Content-type: asfdsgfhrsiu/luhgireughinfibvn");
would work equally well as application/force-download
> header("Content-Disposition: attachment; filename=".basename($F));
> @readfile($F);
> ?>
>
> $F was the filename passed as a variable.
And if $F is set to /etc/passwd what does your script hand out?
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?