Hello,

This is the URL of the link that I use.
http://www.sitename.com/pizzeria.php3?pizzeria=aldentes

Here is the code from the script.
$file_path = "menus";
$file = $pizzeria . ".pdf";
$full_file = $file_path."/".$file;
$filesize=filesize($full_file);

header("Content-disposition: attachment; filename=\"$file\"");
header("Content-type: application-download");
header("Pragma: no-cache");
header("Expires: 0");
$fn=fopen($full_file,"r");
fpassthru($fn);
fclose($fn);
exit;

I tried it and it did not work. When I click on the link it shows "pizzeria.htm"
in the File Name field. Any other suggestions.

Regards,
Edgar

-----Original Message-----
From: Pierre-Yves Lemaire [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:41 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Need to download files in IE


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 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to