At 02:04 30.01.2003, Dara Dowd said: --------------------[snip]-------------------- >$fname is the name of the file i want to download. It works in IE, as in the >name of the file to be downloaded appears correctly in the dialog box. I >changed 'application/octet' to 'application/octet-stream' and this had no >effect. --------------------[snip]--------------------
This is what I do to transmit a file for a save-as download, and it works in all browsers I know and have tested the same (Netscape, IE, Opera/Win; Mozilla, Konqueror et al. / Linux): header('Content-type: application/octet-stream'); header('Content-length: ' . strlen($this->export)); header('Content-Disposition: attachment' . (empty($fname) ? '' : ';filename="'.$fname.'.csv"')); echo $this->export; exit(); Note that it seems to be necessary to surround the filename using quotes to make it work correctly. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php