Re: content type header for downloading files
| From: | Ernest E Vogelsinger | Date: | Wed, 29 Jan 2003 08:01:59 +0000 |
| Subject: | Re: content type header for downloading files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133464@lists.php.net to get a copy of this message | ||
At 03:27 29.01.2003, Dara Dowd said:
--------------------[snip]--------------------
>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).";");
--------------------[snip]--------------------
The correct Content-type is "application/octet-stream". Should work with that.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/