note 25230 added to function.header
| From: | php at silisoftware dot com | Date: | Sun, 15 Sep 2002 19:03:30 +0000 |
| Subject: | note 25230 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36707@lists.php.net to get a copy of this message | ||
If you have a bunch of MP3s (or other file types that would be undesirably opened by an application)
that you want to force to download rather than opening when clicked, you can simply create a
.htaccess file containing:
AddType application/mp3 mp3
Put the .htaccess file in the directory you're serving the MP3s from (or a parent directory).
"mp3" is the extension of the filetype whose behaviour you wish to modify, and
"application/mp3" could be substituted with "application/pdf" or
"application/octet-stream" or whatever.
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+25230
http://master.php.net/manage/user-notes.php?action=delete+25230
http://master.php.net/manage/user-notes.php?action=reject+25230