Re: Need to download files in IE
| From: | Pierre-Yves Lemaire | Date: | Mon, 12 Mar 2001 15:40:42 +0000 |
| Subject: | Re: Need to download files in IE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43538@lists.php.net to get a copy of this message | ||
Hello,
I do that with this piece of code. ( This will close the window, so open a
new one and put this code inside)
header("Content-disposition: attachment; filename=\"$fileName\"");
header("Content-type: application-download");
header("Pragma: no-cache");
header("Expires: 0");
$fn=fopen($FileName,"r");
fpassthru($fn);
fclose($fn);
exit;
py
----- Original Message -----
From: James R. Edgar <edgar@webt.com>
To: <php-general@lists.php.net>
Sent: Monday, March 12, 2001 7:57 PM
Subject: [PHP] Need to download files in IE
> I am trying to set my script up so that when a person clicks on the link,
that
> the page will prompt for a download w/ the filename in the File Name field
in
> the Save As prompt.
> I can get this to work in Netscapse but when I try to do it with Internet
> Explorer I encounter problems. It either says there is no application to
read
> the file (I have acrobat reader on the computer.) or it displays the
prompt with
> either [variable's name passed to script].htm or download.php. And the
file I am
> trying to download is a PDF file. If anyone can help me with this I would
> greatly appreciate this, and thanks in advance.
>
> Regards,
> Edgar
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>