content type header for downloading files
| From: | Dara Dowd | Date: | Wed, 29 Jan 2003 02:27:21 +0000 |
| Subject: | content type header for downloading files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133453@lists.php.net to get a copy of this message | ||
I have the following headers in download.php which forces a download dialog box to be opened when a
user clicks on a desired file:
header("Content-type: application/octet");
header("Content-Length: $filelength"); header("Content-Disposition: attachment;
filename=".basename($fname).";");
This works fine with IE, but Mozilla adds a '.php' extension to the filename if i choose
the save option, and asks me to choose which application to use if I want to open the file. The
files are binary.
Do I need to change the content-type header? If so, to what? If not, what do I do?
Thanks, Dara
--
For the largest free email in Ireland (25MB) &
File Storage space (20MB), visit http://www.campus.ie
Powered by Outblaze