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

From: Date: Fri, 22 May 2009 17:13:31 +0000
Subject: Re: IE can't download, FF can: SSL ? Need special headers?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-292974@lists.php.net to get a copy of this message
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.

« previous php.general (#292974) next »