note 24851 deleted from function.header by sniper
| From: | sniper@php.net | Date: | Sun, 07 Sep 2003 21:32:24 +0000 |
| Subject: | note 24851 deleted from function.header by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55613@lists.php.net to get a copy of this message | ||
Note Submitter: chen@hivemail.com
----
Here is a comprehensive list of MIME types you can send using the Content-Type header in a PHP array
format and easy usage. Taken directly from Apache2's mime.type file, contains types for 138
file extensions:
http://www.hivemail.com/mime.types.phps
If $filename contains the name of the file you want to serve, use this code to send the right type:
header('Content-Type: ' . $mimetypes[substr(strrchr($filename, '.'), 1)]);