On Sat, 6 Dec 2003, Geoffrey Thompson wrote: > header("Content-Type:application/csv"); > header("Content-Disposition:attachment; filename=downloadFile.csv"); > header("Content-Transfer-Encoding:binary"); > fpassthru($fp); > > This works great in Mozilla and IE 6 via http, and it works in Mozilla > via https, but for some reason in IE 6 via https, my filename is > mysteriously replaced by a truncated version of my page url. This > results in an error, because the file (obviously) cannot be found to be > downloaded. Is it something I'm doing, or is this an IE problem?
This is the workaround I use for the IE/https download problems. Not sure if it's the same problem, but let me know if this helps: <?php $fname = "yourfile.csv"; $mimetype = "application"; $mimesubtype = "unknown"; $fp = fopen($fname,"r"); header("Content-type: $mimetype/$mimesubtype"); header(sprintf('Content-disposition: attachment; filename="%s"', basename($fname))); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: public"); fpassthru($fp); fclose($fp); ?> -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php