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

From: Date: Thu, 28 May 2009 21:03:08 +0000
Subject: Re: IE can't download, FF can: SSL ? Need special headers?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-293328@lists.php.net to get a copy of this message
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.

« previous php.general (#293328) next »