Re: Re: mac ie and force download
| From: | Miguel Cruz | Date: | Thu, 04 Jul 2002 06:15:43 +0000 |
| Subject: | Re: Re: mac ie and force download | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105366@lists.php.net to get a copy of this message | ||
On Tue, 2 Jul 2002, Richard Lynch wrote:
> If you can't do .htaccess, for whatever reason, second-best choice is:
>
> <A
> HREF=download.php/filenameyouwant.doc?filename=filenameyouwant.doc>Download<
> /A>
>
> Apache and PHP are gonna ignore the bogus /filenameyouwant.doc part, while
> the browser stupidly believes that's what it surfed to, since it looks like
> the "end" of the URL.
Why not do
<a href='download.php/filenameyouwant.doc'>download</a>
and then in download.php, just set
$filename = substr($_SERVER['PATH_INFO'], 1);
...?
miguel