php3-list | 199908
Date: 08/31/99
- Next message: Chris Cosentino: "[PHP3] PHP escaping text I don't want escaped."
- Previous message: Richard Lynch: "[PHP3] Re: New Warning: KriZ will clear Bios at Christmas Day(August 18, 1999)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have checked the list archive for this question and have not found an
answer.
I am using a download wrapper to download a file from a non-web directory.
Below is the code I use:
Header( "Content-Disposition: attachment; filename=$filename");
Header ( "Content-Type: application/octet-stream");
Header ( "Content-Length: ".filesize("$file"));
readfile("$file");
Where $filename is the name of the file and $file is the full path. With
IE4.0, this works without problems. With Netscape, the default filename is
incorrect. For example say I am trying to download "test.xls". This works
fine. The default filename appears correctly and I can save the file. If I
try to download "test._$$", the default name shows up as "test.html".
I have tried sending the filename in the URL like so:
http://www.foo.com/download.php3/test._%24%24?file=/test._%24%24
Note: The "%24"="$". I tried it both ways with no luck. I have also
played around with the order of the headers with no luck. Again, netscape
is getting the default filename, it is just ignoring the extension of "_$$"
or "_rt" or almost anything unusual. Most common extensions work such as
"xls", "exe", "zip" or anything else that is defined in the mime table in
preferences.
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Cosentino: "[PHP3] PHP escaping text I don't want escaped."
- Previous message: Richard Lynch: "[PHP3] Re: New Warning: KriZ will clear Bios at Christmas Day(August 18, 1999)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

