`
haofeng82
  • 浏览: 144458 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

常用mimetype列表 (转)

阅读更多

文章转自:

http://blog.csdn.net/alin0725/archive/2007/04/08/1556481.aspx

好像excle的应该为:

application/vnd.ms-excel

<?php
$mimetypelist["csm"] = "application/cu-seeme";
$mimetypelist["cu"] = "application/cu-seeme";
$mimetypelist["tsp"] = "application/dsptype";
$mimetypelist["xls"] = "application/excel";
$mimetypelist["spl"] = "application/futuresplash";
$mimetypelist["hqx"] = "application/mac-binhex40";
$mimetypelist["doc"] = "application/msword";
$mimetypelist["dot"] = "application/msword";
$mimetypelist["bin"] = "application/octet-stream";
$mimetypelist["oda"] = "application/oda";
$mimetypelist["pdf"] = "application/pdf";
$mimetypelist["pgp"] = "application/pgp-signature";
$mimetypelist["ps"] = "application/postscript";
$mimetypelist["ai"] = "application/postscript";
$mimetypelist["eps"] = "application/postscript";
$mimetypelist["ppt"] = "application/powerpoint";
$mimetypelist["rtf"] = "application/rtf";
$mimetypelist["wp5"] = "application/wordperfect5.1";
$mimetypelist["zip"] = "application/zip";
$mimetypelist["wk"] = "application/x-123";
$mimetypelist["bcpio"] = "application/x-bcpio";
$mimetypelist["pgn"] = "application/x-chess-pgn";
$mimetypelist["cpio"] = "application/x-cpio";
$mimetypelist["deb"] = "application/x-debian-package";
$mimetypelist["dcr"] = "application/x-director";
$mimetypelist["dir"] = "application/x-director";
$mimetypelist["dxr"] = "application/x-director";
$mimetypelist["dvi"] = "application/x-dvi";
$mimetypelist["pfa"] = "application/x-font";
$mimetypelist["pfb"] = "application/x-font";
$mimetypelist["gsf"] = "application/x-font";
$mimetypelist["pcf"] = "application/x-font";
$mimetypelist["pcf.Z"] = "application/x-font";
$mimetypelist["gtar"] = "application/x-gtar";
$mimetypelist["tgz"] = "application/x-gtar";
$mimetypelist["hdf"] = "application/x-hdf";
$mimetypelist["phtml"] = "application/x-httpd-php";
$mimetypelist["pht"] = "application/x-httpd-php";
$mimetypelist["php"] = "application/x-httpd-php";
$mimetypelist["php3"] = "application/x-httpd-php3";
$mimetypelist["phps"] = "application/x-httpd-php3-source";
$mimetypelist["php3p"] = "application/x-httpd-php3-preprocessed";
$mimetypelist["class"] = "application/x-java";
$mimetypelist["latex"] = "application/x-latex";
$mimetypelist["frm"] = "application/x-maker";
$mimetypelist["maker"] = "application/x-maker";
$mimetypelist["frame"] = "application/x-maker";
$mimetypelist["fm"] = "application/x-maker";
$mimetypelist["fb"] = "application/x-maker";
$mimetypelist["book"] = "application/x-maker";
$mimetypelist["fbdoc"] = "application/x-maker";
$mimetypelist["mif"] = "application/x-mif";
$mimetypelist["com"] = "application/x-msdos-program";
$mimetypelist["exe"] = "application/x-msdos-program";
$mimetypelist["bat"] = "application/x-msdos-program";
$mimetypelist["dll"] = "application/x-msdos-program";
$mimetypelist["nc"] = "application/x-netcdf";
$mimetypelist["cdf"] = "application/x-netcdf";
$mimetypelist["pac"] = "application/x-ns-proxy-autoconfig";
$mimetypelist["o"] = "application/x-object";
$mimetypelist["pl"] = "application/x-perl";
$mimetypelist["pm"] = "application/x-perl";
$mimetypelist["shar"] = "application/x-shar";
$mimetypelist["swf"] = "application/x-shockwave-flash";
$mimetypelist["swfl"] = "application/x-shockwave-flash";
$mimetypelist["sit"] = "application/x-stuffit";
$mimetypelist["sv4cpio"] = "application/x-sv4cpio";
$mimetypelist["sv4crc"] = "application/x-sv4crc";
$mimetypelist["tar"] = "application/x-tar";
$mimetypelist["gf"] = "application/x-tex-gf";
$mimetypelist["pk"] = "application/x-tex-pk";
$mimetypelist["PK"] = "application/x-tex-pk";
$mimetypelist["texinfo"] = "application/x-texinfo";
$mimetypelist["texi"] = "application/x-texinfo";
$mimetypelist["~"] = "application/x-trash";
$mimetypelist["%"] = "application/x-trash";
$mimetypelist["bak"] = "application/x-trash";
$mimetypelist["old"] = "application/x-trash";
$mimetypelist["sik"] = "application/x-trash";
$mimetypelist["t"] = "application/x-troff";
$mimetypelist["tr"] = "application/x-troff";
$mimetypelist["roff"] = "application/x-troff";
$mimetypelist["man"] = "application/x-troff-man";
$mimetypelist["me"] = "application/x-troff-me";
$mimetypelist["ms"] = "application/x-troff-ms";
$mimetypelist["ustar"] = "application/x-ustar";
$mimetypelist["src"] = "application/x-wais-source";
$mimetypelist["wz"] = "application/x-wingz";
$mimetypelist["au"] = "audio/basic";
$mimetypelist["snd"] = "audio/basic";
$mimetypelist["mid"] = "audio/midi";
$mimetypelist["midi"] = "audio/midi";
$mimetypelist["mpga"] = "audio/mpeg";
$mimetypelist["mpega"] = "audio/mpeg";
$mimetypelist["mp2"] = "audio/mpeg";
$mimetypelist["mp3"] = "audio/mpeg";
$mimetypelist["m3u"] = "audio/mpegurl";
$mimetypelist["aif"] = "audio/x-aiff";
$mimetypelist["aiff"] = "audio/x-aiff";
$mimetypelist["aifc"] = "audio/x-aiff";
$mimetypelist["gsm"] = "audio/x-gsm";
$mimetypelist["ra"] = "audio/x-pn-realaudio";
$mimetypelist["rm"] = "audio/x-pn-realaudio";
$mimetypelist["ram"] = "audio/x-pn-realaudio";
$mimetypelist["rpm"] = "audio/x-pn-realaudio-plugin";
$mimetypelist["wav"] = "audio/x-wav";
$mimetypelist["gif"] = "image/gif";
$mimetypelist["ief"] = "image/ief";
$mimetypelist["jpeg"] = "image/jpeg";
$mimetypelist["jpg"] = "image/jpeg";
$mimetypelist["jpe"] = "image/jpeg";
$mimetypelist["png"] = "image/png";
$mimetypelist["tiff"] = "image/tiff";
$mimetypelist["tif"] = "image/tiff";
$mimetypelist["ras"] = "image/x-cmu-raster";
$mimetypelist["bmp"] = "image/x-ms-bmp";
$mimetypelist["pnm"] = "image/x-portable-anymap";
$mimetypelist["pbm"] = "image/x-portable-bitmap";
$mimetypelist["pgm"] = "image/x-portable-graymap";
$mimetypelist["ppm"] = "image/x-portable-pixmap";
$mimetypelist["rgb"] = "image/x-rgb";
$mimetypelist["xbm"] = "image/x-xbitmap";
$mimetypelist["xpm"] = "image/x-xpixmap";
$mimetypelist["xwd"] = "image/x-xwindowdump";
$mimetypelist["csv"] = "text/comma-separated-values";
$mimetypelist["html"] = "text/html";
$mimetypelist["htm"] = "text/html";
$mimetypelist["mml"] = "text/mathml";
$mimetypelist["txt"] = "text/plain";
$mimetypelist["rtx"] = "text/richtext";
$mimetypelist["tsv"] = "text/tab-separated-values";
$mimetypelist["h++"] = "text/x-c++hdr";
$mimetypelist["hpp"] = "text/x-c++hdr";
$mimetypelist["hxx"] = "text/x-c++hdr";
$mimetypelist["hh"] = "text/x-c++hdr";
$mimetypelist["c++"] = "text/x-c++src";
$mimetypelist["cpp"] = "text/x-c++src";
$mimetypelist["cxx"] = "text/x-c++src";
$mimetypelist["cc"] = "text/x-c++src";
$mimetypelist["h"] = "text/x-chdr";
$mimetypelist["csh"] = "text/x-csh";
$mimetypelist["c"] = "text/x-csrc";
$mimetypelist["java"] = "text/x-java";
$mimetypelist["moc"] = "text/x-moc";
$mimetypelist["p"] = "text/x-pascal";
$mimetypelist["pas"] = "text/x-pascal";
$mimetypelist["etx"] = "text/x-setext";
$mimetypelist["sh"] = "text/x-sh";
$mimetypelist["tcl"] = "text/x-tcl";
$mimetypelist["tk"] = "text/x-tcl";
$mimetypelist["tex"] = "text/x-tex";
$mimetypelist["ltx"] = "text/x-tex";
$mimetypelist["sty"] = "text/x-tex";
$mimetypelist["cls"] = "text/x-tex";
$mimetypelist["vcs"] = "text/x-vcalendar";
$mimetypelist["vcf"] = "text/x-vcard";
$mimetypelist["dl"] = "video/dl";
$mimetypelist["fli"] = "video/fli";
$mimetypelist["gl"] = "video/gl";
$mimetypelist["mpeg"] = "video/mpeg";
$mimetypelist["mpg"] = "video/mpeg";
$mimetypelist["mpe"] = "video/mpeg";
$mimetypelist["qt"] = "video/quicktime";
$mimetypelist["mov"] = "video/quicktime";
$mimetypelist["asf"] = "video/x-ms-asf";
$mimetypelist["asx"] = "video/x-ms-asf";
$mimetypelist["avi"] = "video/x-msvideo";
$mimetypelist["movie"] = "video/x-sgi-movie";
$mimetypelist["vrm"] = "x-world/x-vrml";
$mimetypelist["vrml"] = "x-world/x-vrml";
$mimetypelist["wrl"] = "x-world/x-vrml";
?>

分享到:
评论

相关推荐

    常用的MIME TYPE类型枚举类Enum整理 静态方法直接检索使用

    示例代码:String mimeType = MimeTypeEnum.getMimeTypeBySuffix("txt"); 不仅是一款实用的开发工具,更是代码整洁与项目高效管理的体现。通过它,可以专注于业务逻辑的实现,而将MIME类型管理的繁杂细节交给我们。...

    常用文件的mime和mimetype.txt

    常用文件的mime和mimetype,几乎包括所有文件,大概有1000多项

    php获得文件的mime type类

    $mimeType = finfo_file($finfo, $file); // 获取MIME类型 finfo_close($finfo); // 关闭fileinfo对象 ``` 这种方法基于文件内容来判断MIME类型,准确度较高。 2. **`mime_content_type()`** 函数:这是一个较旧但...

    php获得文件的mime type类.zip

    $mimeType = MimeTypeDetector::detectMimeType($filePath); echo "File MIME Type: " . $mimeType; ``` 在实际开发中,可以根据项目需求进一步优化这个类,例如增加对大型文件的支持,避免一次性加载整个文件,...

    mime type 与 扩展名对应表

    最全的Mime type 和扩展名的对应表,媒体解析,流媒体开发不可或缺的资料。

    常用MIME类型大全

    ### 常用MIME类型大全解析 #### MIME类型简介 MIME(Multipurpose Internet Mail Extensions)类型,也称为媒体类型或内容类型,是互联网标准用于定义数据格式和编码方式的一种标识方法。它通常用于HTTP协议中,...

    常用附件对应的mime类型

    以下是从给定的文件信息中提炼出的关于常用附件及其MIME类型的详细知识点: ### MIME类型基础 MIME类型是一种标准,用于表示网络上传输的数据格式。它由两部分组成:类型(Type)和子类型(Subtype)。类型通常指...

    MIME学习笔记--转载

    头部信息中,MIME添加了`MIME-Version`、`Content-Type`和`Content-transfer-encoding`等字段。 4. **MIME头部信息** - `MIME-Version: 1.0`:标识邮件使用MIME规范,且版本固定为1.0。 - `Content-Type: 主要...

    常用Content-type

    在给定的部分内容中,列举了多种常见的MIME类型(Multipurpose Internet Mail Extensions),这是`Content-type`对应的值。MIME类型是一种标准,用于标识文件的类型和编码。以下是一些常见MIME类型的说明: - `...

    php准确获取文件MIME类型的方法

    $mimeType = $finfo-&gt;file(__FILE__); } ``` 2. 另一种方法是使用 `mime_content_type` 函数,该函数可以直接获取指定文件的MIME类型。但是在PHP的某些版本中,该函数已被废弃。使用前需要确保该函数可用,并且...

    PHP实现获取文件mime类型多种方法解析

    `fileinfo`函数不仅适用于图片,还能处理各种类型的文件,因此它是获取MIME类型最常用且推荐的方法。 3. **使用`image_type_to_mime_type`方法** 此方法仅限于处理图像类型文件,需要`php_exif`和`php_mbstring`...

    图片格式转换

    if (encoder.MimeType == mimeType) return encoder; } return null; } ``` 这个例子展示了如何将一个BMP文件转换成JPG,并设置质量为90。实际应用中,你可以根据需求调整编码参数,实现不同格式之间的自由转换...

    FileOperator::fire:涵盖了Android系统文件的创建的复制副本打开文件(目录),获取文件(目录)大小,获取常用目录,获取文件名及后缀,获取MimeType以及MediaStore和SAF的相关操作等常用功能,并且也处理了获取文件UriPath的兼容问题,图片压缩和文件选择等功能

    上一篇 :backhand_index_pointing_right: :rocket: :rocket:更简单的处理Android系统文件操作 :rocket:适用于Android 4.4及以上系统,兼容AndroidQ新的存储策略 :rocket:图片压缩算法参考 :backhand_index_...

    12、Webdynpro入门之常用控件4(上传下载附件)

    - **配置Table控件**:确保其中的`FileDownload`控件正确设置了`text`、`fileName`和`mimeType`属性。 #### 四、编写业务逻辑 在用户点击上传按钮后,需要执行以下操作: 1. **获取上传文件的信息**:通过`N_...

    java一些 常用 的过滤 器

    MIME 类型链过滤器(MIME-Type Chain Filter) MIME类型链过滤器基于请求的MIME类型选择适当的处理逻辑。它们可以根据不同的内容类型调用不同的过滤器或处理器,确保每个请求得到正确的处理。这种机制在多格式支持...

    Linux常用命令大全整理

    - `file file1`:显示文件 `file1` 的 MIME 类型。 - `iconv -l`:列出支持的字符集。 - `iconv -f fromEncoding -t toEncoding inputFile &gt; outputFile`:将 `inputFile` 的编码从 `fromEncoding` 转换为 `to...

Global site tag (gtag.js) - Google Analytics