php header Content-Type类型小结


Posted in PHP onJuly 03, 2011
<?php 
$mimetypes = array( 
'ez' => 'application/andrew-inset', 
'hqx' => 'application/mac-binhex40', 
'cpt' => 'application/mac-compactpro', 
'doc' => 'application/msword', 
'bin' => 'application/octet-stream', 
'dms' => 'application/octet-stream', 
'lha' => 'application/octet-stream', 
'lzh' => 'application/octet-stream', 
'exe' => 'application/octet-stream', 
'class' => 'application/octet-stream', 
'so' => 'application/octet-stream', 
'dll' => 'application/octet-stream', 
'oda' => 'application/oda', 
'pdf' => 'application/pdf', 
'ai' => 'application/postscript', 
'eps' => 'application/postscript', 
'ps' => 'application/postscript', 
'smi' => 'application/smil', 
'smil' => 'application/smil', 
'mif' => 'application/vnd.mif', 
'xls' => 'application/vnd.ms-excel', 
'ppt' => 'application/vnd.ms-powerpoint', 
'wbxml' => 'application/vnd.wap.wbxml', 
'wmlc' => 'application/vnd.wap.wmlc', 
'wmlsc' => 'application/vnd.wap.wmlscriptc', 
'bcpio' => 'application/x-bcpio', 
'vcd' => 'application/x-cdlink', 
'pgn' => 'application/x-chess-pgn', 
'cpio' => 'application/x-cpio', 
'csh' => 'application/x-csh', 
'dcr' => 'application/x-director', 
'dir' => 'application/x-director', 
'dxr' => 'application/x-director', 
'dvi' => 'application/x-dvi', 
'spl' => 'application/x-futuresplash', 
'gtar' => 'application/x-gtar', 
'hdf' => 'application/x-hdf', 
'js' => 'application/x-javascript', 
'skp' => 'application/x-koan', 
'skd' => 'application/x-koan', 
'skt' => 'application/x-koan', 
'skm' => 'application/x-koan', 
'latex' => 'application/x-latex', 
'nc' => 'application/x-netcdf', 
'cdf' => 'application/x-netcdf', 
'sh' => 'application/x-sh', 
'shar' => 'application/x-shar', 
'swf' => 'application/x-shockwave-flash', 
'sit' => 'application/x-stuffit', 
'sv4cpio' => 'application/x-sv4cpio', 
'sv4crc' => 'application/x-sv4crc', 
'tar' => 'application/x-tar', 
'tcl' => 'application/x-tcl', 
'tex' => 'application/x-tex', 
'texinfo' => 'application/x-texinfo', 
'texi' => 'application/x-texinfo', 
't' => 'application/x-troff', 
'tr' => 'application/x-troff', 
'roff' => 'application/x-troff', 
'man' => 'application/x-troff-man', 
'me' => 'application/x-troff-me', 
'ms' => 'application/x-troff-ms', 
'ustar' => 'application/x-ustar', 
'src' => 'application/x-wais-source', 
'xhtml' => 'application/xhtml+xml', 
'xht' => 'application/xhtml+xml', 
'zip' => 'application/zip', 
'au' => 'audio/basic', 
'snd' => 'audio/basic', 
'mid' => 'audio/midi', 
'midi' => 'audio/midi', 
'kar' => 'audio/midi', 
'mpga' => 'audio/mpeg', 
'mp2' => 'audio/mpeg', 
'mp3' => 'audio/mpeg', 
'aif' => 'audio/x-aiff', 
'aiff' => 'audio/x-aiff', 
'aifc' => 'audio/x-aiff', 
'm3u' => 'audio/x-mpegurl', 
'ram' => 'audio/x-pn-realaudio', 
'rm' => 'audio/x-pn-realaudio', 
'rpm' => 'audio/x-pn-realaudio-plugin', 
'ra' => 'audio/x-realaudio', 
'wav' => 'audio/x-wav', 
'pdb' => 'chemical/x-pdb', 
'xyz' => 'chemical/x-xyz', 
'bmp' => 'image/bmp', 
'gif' => 'image/gif', 
'ief' => 'image/ief', 
'jpeg' => 'image/jpeg', 
'jpg' => 'image/jpeg', 
'jpe' => 'image/jpeg', 
'png' => 'image/png', 
'tiff' => 'image/tiff', 
'tif' => 'image/tiff', 
'djvu' => 'image/vnd.djvu', 
'djv' => 'image/vnd.djvu', 
'wbmp' => 'image/vnd.wap.wbmp', 
'ras' => 'image/x-cmu-raster', 
'pnm' => 'image/x-portable-anymap', 
'pbm' => 'image/x-portable-bitmap', 
'pgm' => 'image/x-portable-graymap', 
'ppm' => 'image/x-portable-pixmap', 
'rgb' => 'image/x-rgb', 
'xbm' => 'image/x-xbitmap', 
'xpm' => 'image/x-xpixmap', 
'xwd' => 'image/x-xwindowdump', 
'igs' => 'model/iges', 
'iges' => 'model/iges', 
'msh' => 'model/mesh', 
'mesh' => 'model/mesh', 
'silo' => 'model/mesh', 
'wrl' => 'model/vrml', 
'vrml' => 'model/vrml', 
'css' => 'text/css', 
'html' => 'text/html', 
'htm' => 'text/html', 
'asc' => 'text/plain', 
'txt' => 'text/plain', 
'rtx' => 'text/richtext', 
'rtf' => 'text/rtf', 
'sgml' => 'text/sgml', 
'sgm' => 'text/sgml', 
'tsv' => 'text/tab-separated-values', 
'wml' => 'text/vnd.wap.wml', 
'wmls' => 'text/vnd.wap.wmlscript', 
'etx' => 'text/x-setext', 
'xsl' => 'text/xml', 
'xml' => 'text/xml', 
'mpeg' => 'video/mpeg', 
'mpg' => 'video/mpeg', 
'mpe' => 'video/mpeg', 
'qt' => 'video/quicktime', 
'mov' => 'video/quicktime', 
'mxu' => 'video/vnd.mpegurl', 
'avi' => 'video/x-msvideo', 
'movie' => 'video/x-sgi-movie', 
'ice' => 'x-conference/x-cooltalk', 
); 
?>
PHP 相关文章推荐
php download.php实现代码 跳转到下载文件(response.redirect)
Aug 26 PHP
php 处理上百万条的数据库如何提高处理查询速度
Feb 08 PHP
ionCube 一款类似zend的PHP加密/解密工具
Jul 25 PHP
Apache实现Web Server负载均衡详解(不考虑Session版)
Jul 05 PHP
PHP判断远程图片或文件是否存在的实现代码
Feb 20 PHP
微信营销平台系统?刮刮乐的开发
Jun 10 PHP
mantis安装、配置和使用中的问题小结
Jul 14 PHP
php数组使用规则分析
Feb 27 PHP
PHP面试题之文件目录操作
Oct 15 PHP
Yii2下点击验证码的切换实例代码
Mar 14 PHP
PHP 实现浏览记录并按日期分组
May 11 PHP
PHP结合Ffmpeg快速搭建流媒体服务的实践记录
Oct 31 PHP
php中关于codeigniter的xmlrpc的类在进行数据交换时的类型问题
Jul 03 #PHP
PHP采集利器 Snoopy 试用心得
Jul 03 #PHP
php中的三元运算符使用说明
Jul 03 #PHP
PHP 数据结构 算法 三元组 Triplet
Jul 02 #PHP
php中批量删除Mysql中相同前缀的数据表的代码
Jul 01 #PHP
PHP中error_reporting()函数的用法(修改PHP屏蔽错误)
Jul 01 #PHP
PHP函数之error_reporting(E_ALL ^ E_NOTICE)详细说明
Jul 01 #PHP
You might like
php设计模式之单例模式使用示例
2014/01/20 PHP
PHP+MySQL修改记录的方法
2015/01/21 PHP
通过Email发送PHP错误的方法
2015/07/20 PHP
php文件包含的几种方式总结
2019/09/19 PHP
js身份证判断方法支持15位和18位
2014/03/18 Javascript
js 设置缓存及获取设置的缓存
2014/05/08 Javascript
nodejs 整合kindEditor实现图片上传
2015/02/03 NodeJs
JS获取图片lowsrc属性的方法
2015/04/01 Javascript
使用CDN和AJAX加速WordPress中jQuery的加载
2015/12/05 Javascript
Bootstrap CSS使用方法
2016/12/23 Javascript
Node.js调试技术总结分享
2017/03/12 Javascript
基于vue1和vue2获取dom元素的方法
2018/03/17 Javascript
Vue 监听列表item渲染事件方法
2018/09/06 Javascript
详解如何理解vue的key属性
2019/04/14 Javascript
在VUE中实现文件下载并判断状态的方法
2019/11/08 Javascript
node.js中事件触发器events的使用方法实例分析
2019/11/23 Javascript
vue 导航锚点_点击平滑滚动,导航栏对应变化详解
2020/08/10 Javascript
node.js如何操作MySQL数据库
2020/10/29 Javascript
Python 字符串定义
2009/09/25 Python
python统计字符串中指定字符出现次数的方法
2015/04/04 Python
python PIL模块与随机生成中文验证码
2016/02/27 Python
PyQt5实现下载进度条效果
2018/04/19 Python
Python 实现文件打包、上传与校验的方法
2019/02/13 Python
详解python做UI界面的方法
2019/02/27 Python
Django实现跨域请求过程详解
2019/07/25 Python
解决启动django,浏览器显示“服务器拒绝访问”的问题
2020/05/13 Python
python2和python3哪个使用率高
2020/06/23 Python
使用HTML5 Canvas绘制圆角矩形及相关的一些应用举例
2016/03/22 HTML / CSS
如何手工释放资源
2013/12/15 面试题
超市营业员求职简历的自我评价
2013/10/17 职场文书
机械专业技术员求职信
2014/06/14 职场文书
社区精神文明建设汇报材料
2014/08/17 职场文书
资料员岗位职责
2015/02/10 职场文书
自我工作评价范文
2015/03/06 职场文书
千手观音观后感
2015/06/03 职场文书
python游戏开发之pygame实现接球小游戏
2022/04/22 Python