Re: Discarded extension on file download

From: Date: Fri, 19 Apr 2002 09:18:54 +0000
Subject: Re: Discarded extension on file download
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93649@lists.php.net to get a copy of this message
Hi, I recently had this problem and, after hours of hair pulling, found that it seems to work best if you send the words Content-Type and Content-Disposition in **lower case**. Not sure why it has to be like that but it was the only way I found. HTH, Danny. ----- Original Message ----- From: "Tomas Mikulecky" <tm@caldera.fr> To: <php-general@lists.php.net> Sent: Friday, April 19, 2002 9:40 AM Subject: [PHP] Discarded extension on file download > Hi > > I am trying to offer downloading files from a web server, using PHP. > > The files are gzipped text and have all .txt.gz extensions. Now while on > Windows systems both IE and Netscape offers to download it under the > full name (althought IE adds [some_number] to the base of the file > name), under Unix or Linux systems (tested with netscape 4.7) the '.gz' > part is discarded from the file name and the file is saved with .txt > only. Downloaded file is still gzipped. > > The part of script serving the files is as follows: > > header("Content-type: application/octet-stream"); > header("Content-Disposition: attachment; filename=$my_filename"); > echo($file_body); > > What am-I doing wrong? Thanks in advance > > Tom > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#93649) next »