Re: [PHP] Discarded extension on file download

2002-04-19 Thread Tom Mikulecky

This don't work for me :(
Extension .gz is still throwed away.

Tom

Danny Shepherd wrote:

> 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" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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




Re: [PHP] Discarded extension on file download

2002-04-19 Thread Danny Shepherd

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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Discarded extension on file download

2002-04-19 Thread Tomas Mikulecky

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