note 84149 added to function.mime-content-type
| From: | MKoper at osu1 dot php dot net | Date: | Tue, 01 Jul 2008 08:29:20 +0000 |
| Subject: | note 84149 added to function.mime-content-type | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-141025@lists.php.net to get a copy of this message | ||
Regarding serkanyersen's example, i extended the extensions list
case "js":
return "application/x-javascript";
case "json":
return "application/json";
case "jpg":
case "jpeg":
case "jpe":
return "image/jpg";
case "png":
case "gif":
case "bmp":
case "tiff":
return "image/".strtolower($matches[1]);
case "css":
return "text/css";
case "xml":
return "application/xml";
case "doc":
case "docx":
return "application/msword";
case "xls":
case "xlt":
case "xlm":
case "xld":
case "xla":
case "xlc":
case "xlw":
case "xll":
return "application/vnd.ms-excel";
case "ppt":
case "pps":
return "application/vnd.ms-powerpoint";
case "rtf":
return "application/rtf";
case "pdf":
return "application/pdf";
case "html":
case "htm":
case "php":
return "text/html";
case "txt":
return "text/plain";
case "mpeg":
case "mpg":
case "mpe"
return "video/mpeg";
case "mp3":
return "audio/mpeg3";
case "wav":
return "audio/wav";
case "aiff":
case "aif":
return "audio/aiff";
case "avi":
return "video/msvideo";
case "wmv":
return "video/x-ms-wmv";
case "mov":
return "video/quicktime";
case "zip":
return "application/zip";
case "tar":
return "application/x-tar";
case "swf":
return "application/x-shockwave-flash";
----
Server IP: 83.137.20.135
Probable Submitter: 213.148.239.200
----
Manual Page -- http://www.php.net/manual/en/function.mime-content-type.php
Edit -- https://master.php.net/note/edit/84149
Del: integrated -- https://master.php.net/note/delete/84149/integrated
Del: useless -- https://master.php.net/note/delete/84149/useless
Del: bad code -- https://master.php.net/note/delete/84149/bad+code
Del: spam -- https://master.php.net/note/delete/84149/spam
Del: non-english -- https://master.php.net/note/delete/84149/non-english
Del: in docs -- https://master.php.net/note/delete/84149/in+docs
Del: other reasons-- https://master.php.net/note/delete/84149
Reject -- https://master.php.net/note/reject/84149
Search -- https://master.php.net/manage/user-notes.php