note 52388 deleted from function.mime-content-type by bjori
| From: | bjori@php.net | Date: | Tue, 18 Apr 2006 21:03:55 +0000 |
| Subject: | note 52388 deleted from function.mime-content-type by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108439@lists.php.net to get a copy of this message | ||
Note Submitter: sunfra at firenze dot net
----
if you arern't allowed to use mime_content_type, you can use this function
<?php
function mime_content_type_($filename)
{
$mime = array(
'.3dmf' => 'x-world/x-3dmf',
'.a' => 'application/octet-stream',
'.aab' => 'application/x-authorware-bin',
//[... i have to cut, the text is too long :/ ..]
'.xwd' => 'image/x-xwd',
'.xyz' => 'chemical/x-pdb',
'.z' => 'application/x-compressed',
'.zip' => 'application/x-zip-compressed',
'.zoo' => 'application/octet-stream',
'.zsh' => 'text/x-script.zsh',
);
return $mime[strrchr($filename, '.')];
}
?>