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

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

 



Andrea and Ashley,
Thanks ladies.

Originally, IE claimed that the server wasn't even there (with that
wacky IE error).  I was lacking headers (which was fine for 6 years
prior).

The code below is consistent across the 3 browsers I tried (Safari,
FF, IE).  However, it converts spaces to underscores.  I'm keeping
this code:
header('Content-Description: File Transfer');
header('Content-Type: '.$type);
header('Content-Disposition: attachment;
filename='.basename(str_replace(' ', '_', $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;

If I use
header('Content-Disposition: attachment; filename="'.basename($name).'"');
of the 3 browsers tested, only IE will replace spaces with
underscores.  Safari and FF pass through correctly.  But I'll go with
consistency and avoid the "if browser-war" clauses.

Thanks all.

-- 
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