Re: IE can't download, FF can: SSL ? Need special headers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I went with this, modified from http://php.he.net/readfile docs example 1:

header('Content-Description: File Transfer');
header('Content-Type: '.$type);
header('Content-Disposition: attachment; filename='.basename($name));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: '.$size);
echo $data;

And it works in FF 3.0.10 and IE 7 and Safari 3.2.1.
I thought it would be some header magic.



Bastien,
I think because I was not urlencoding or not basenaming the filename,
it would come through as the name of the script if the name had a
space in it.  test.pdf actually came through with the name test.pdf.
But the real filenames are like "QUOTE Part 1-2 Prospect Name.pdf".

Thanks everybody.

I was looking up those other header names and case sensitivity when I
found the readfile example.  DebugBar reports a different case than
what I sent, so I thought that could be an issue too (like
Content-Length versus Content-length).  Moot for me now though.

Re-RTFM I guess.

Regards.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux