By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

file download suggestions

P: n/a
I know that is a very old issue but testing an looking around didn't
help me so much. In there is this code to make a file download:

// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");

// We'll be outputting a PDF
header('Content-type: application/zip');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename=""');

// The PDF source is in original.pdf

And it works fine in firefox, in IE instead when I go to the url it says:

"Internet Explorer cannot download download.php from..."
Any idea?
Thanks, chr
__________________________________________________ _________________
{ Christian Giordano's site and blog @ }
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
This might be a case of header overkill. I have a script creating and
outputting an RTF document, and the end of it looks like this:
header("Content-Type: application/rtf");
header("Content-Disposition: attachment;
header("Content-Length: " . strlen($rtfdoc));
echo $rtfdoc;

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.