首頁 > 後端開發 > php教程 > php MIME類型數組

php MIME類型數組

WBOY
發布: 2016-07-25 08:43:08
原創
785 人瀏覽過

這個陣列包含了常見的MIME類型,如果你需要做檔案下載,可以透過這個陣列查看檔案副檔名,判斷是否可以下載

  1. $mime_types = array("323" => "text/h323",
  2. "acx" => "application/internet-property-stream",
  3. " ai" => "應用程式/postscript",
  4. "aif" => "音訊/x-aiff",
  5. "aifc" => "音訊/x-aiff",
  6. “aiff”= >“音訊/x-aiff”,
  7. “asf”=>“視訊/x-ms-asf”,
  8. “asr”=>“視訊/x-ms-asf” ",
  9. " asx" => "video/x-ms-asf",
  10. "au" => "音訊/基本",
  11. "avi" => "video/x- msvideo",
  12. "axs" => "應用程式/olescript",
  13. "bas" => "文字/純文字",
  14. "bcpio" => "應用程式/x-bcpio",
  15. 「bin」=>“應用程式/八位元組流”,
  16. “bmp”=>“圖像/bmp”,
  17. “c”=>“文字/純文字”,
  18. "cat" => "application/ vnd.ms-pkiseccat",
  19. "cdf" => "application/x-cdf",
  20. "cer" => "application/x-x509-ca -cert",
  21. "class" = > "application/octet-stream",
  22. "clp" => "application/x-msclip",
  23. "cmx" => "image/ x-cmx",
  24. "cod" => " image/cis-cod",
  25. "cpio" => "application/x-cpio",
  26. "crd" => "應用程式/x-mscardfile",
  27. "crl" => "application /pkix-crl",
  28. "crt" => "application/x-x509-ca-cert",
  29. "csh" => "application/x-csh",
  30. "css" => ; "text/css",
  31. "dcr" =>; "application/x-director",
  32. "der" =>; "application/x-x509-ca-cert",
  33. "dir " =>; "application/x-director",
  34. "dll" =>; "application/x-msdownload",
  35. "dms" =>; "application/octet-stream",
  36. " doc" =>; "application/msword",
  37. "點" => "application/msword",
  38. "dvi" =>; "application/x-dvi",
  39. "dxr" => ; "application/x-director",
  40. "eps" =>; "application/postscript",
  41. "etx" =>; "text/x-setext",
  42. "evy" =>; "application/envoy",
  43. "exe" =>; "application/octet-stream",
  44. "fif" =>; "應用程式/分形",
  45. "flr" =>; "x- world/x-vrml",
  46. "gif" =>; "image/gif",
  47. "gtar" =>; "application/x-gtar",
  48. "gz" =>; "application /x-gzip",
  49. "h" =>; "text/plain",
  50. "hdf" =>; "application/x-hdf",
  51. "hlp" =>; "application/ winhlp",
  52. "hqx" =>; "application/mac-binhex40",
  53. "hta" =>; "application/hta",
  54. "htc" =>; "text/x-component ",
  55. "htm" =>; "text/html",
  56. "html" =>; "text/html",
  57. "htt" =>; "text/webviewhtml",
  58. "ico" =>; "image/x-icon",
  59. "ief" =>; "image/ief",
  60. "iii" =>; "application/x-iphone",
  61. " ins" =>; "application/x-internet-signup",
  62. "isp" =>; "application/x-internet-signup",
  63. "jfif" =>; "image/pipeg",
  64. "jpe" =>; "image/jpeg",
  65. "jpeg" =>; "image/jpeg",
  66. "jpg" =>; "image/jpeg",
  67. "js" =>; "application/x-javascript",
  68. "latex" =>; "application/x-latex",
  69. "lha" =>; "application/octet-stream",
  70. "lsf " =>; "video/x-la-asf",
  71. "lsx" =>; "video/x-la-asf",
  72. "lzh" =>; "application/octet-stream",
  73. "m13" =>; "application/x-msmediaview",
  74. "m14" =>; "application/x-msmediaview",
  75. "m3u" =>; "audio/x-mpegurl" ,
  76. "man" =>; "application/x-troff-man",
  77. "mdb" =>; "application/x-msaccess",
  78. "me" =>; "application/x -troff-me",
  79. "mht" =>; "message/rfc822",
  80. "mhtml" =>; "message/rfc822",
  81. "mid" =>; “音頻/中音”,
  82. “mny”=>“application/x-msmoney”,
  83. “mov”=>; "影片/quicktime",
  84. "電影" =>; "video/x-sgi-movie",
  85. "mp2" =>; "影片/mpeg",
  86. "mp3" =>; "音頻/mpeg",
  87. "mpa" =>; "影片/mpeg",
  88. "mpe" =>; "影片/mpeg",
  89. "mpeg" =>; "影片/mpeg",
  90. "mpg" =>; "影片/mpeg",
  91. "mpp" =>; "application/vnd.ms-project",
  92. "mpv2" =>; "視訊/mpeg",
  93. "ms" =>; "application/x-troff-ms",
  94. "mvb" =>; "application/x-msmediaview",
  95. "nws" =>; "message/rfc822",
  96. "oda" =>; "申請/oda",
  97. "p10" =>; "application/pkcs10",
  98. "p12" =>; "application/x-pkcs12",
  99. "p7b" =>; "application/x-pkcs7-certificates",
  100. "p7c" =>; "application/x-pkcs7-mime",
  101. "p7m" =>; "application/x-pkcs7-mime",
  102. "p7r" =>; "application/x-pkcs7-certreqresp",
  103. "p7s" =>; "application/x-pkcs7-signature",
  104. "pbm" =>; "image/x-portable-bitmap",
  105. "pdf" =>; "application/pdf",
  106. "pfx" =>; "application/x-pkcs12",
  107. "pgm" =>; "image/x-portable-graymap",
  108. "pko" =>; "application/ynd.ms-pkipko",
  109. "pma" =>; "application/x-perfmon",
  110. "pmc" =>; "application/x-perfmon",
  111. "pml" =>; "application/x-perfmon",
  112. "pmr" =>; "application/x-perfmon",
  113. "pmw" =>; "application/x-perfmon",
  114. "pnm" =>; "image/x-portable-anymap",
  115. "pot" =>; "application/vnd.ms-powerpoint",
  116. "ppm" =>; "image/x-portable-pixmap",
  117. "pps" =>; "application/vnd.ms-powerpoint",
  118. "ppt" =>; "application/vnd.ms-powerpoint",
  119. "prf" =>; "application/pics-rules",
  120. "ps" =>; "application/postscript",
  121. "pub" =>; "application/x-mspublisher",
  122. "qt" =>; "影片/quicktime",
  123. "ra" =>; "audio/x-pn-realaudio",
  124. "ram" =>; "audio/x-pn-realaudio",
  125. "ras" =>; "image/x-cmu-raster",
  126. "rgb" =>; "image/x-rgb",
  127. "rmi" =>; "音訊/中頻",
  128. "roff" => "application/x-troff",
  129. "rtf" =>; "application/rtf",
  130. "rtx" =>; "text/richtext",
  131. "scd" =>; "application/x-msschedule",
  132. "sct" =>; "text/scriptlet",
  133. "setpay" =>; "application/set-付款-發起",
  134. "setreg" =>; "application/set-registration-initiation",
  135. "sh" =>; "application/x-sh",
  136. "shar" =>; "application/x-shar",
  137. "坐" => "application/x-stuffit",
  138. "snd" =>; "音訊/基本",
  139. "spc" => "application/x-pkcs7-certificates",
  140. "spl" =>; "application/futuresplash",
  141. "src" =>; "application/x-wais-source",
  142. "sst" =>; "application/vnd.ms-pkicertstore",
  143. "stl" =>; "application/vnd.ms-pkistl",
  144. "stm" =>; "text/html",
  145. "svg" =>; "image/svg xml",
  146. "sv4cpio" =>; "application/x-sv4cpio",
  147. "sv4crc" =>; "application/x-sv4crc",
  148. "t" =>; "application/x-troff",
  149. "tar" =>; "application/x-tar",
  150. "tcl" =>; "application/x-tcl",
  151. "tex" =>; "application/x-tex",
  152. "texi" =>; "application/x-texinfo",
  153. "texinfo" =>; "application/x-texinfo",
  154. "tgz" =>; "application/x-compressed",
  155. "tif" =>; "影像/tiff",
  156. "tiff" => "影像/tiff",
  157. "tr" =>; "application/x-troff",
  158. "trm" =>; "application/x-msterminal",
  159. "tsv" =>; "文字/製表符分隔值",
  160. "txt" =>; “文字/純文字”,
  161. “uls”=>“text/iuls”,
  162. “ustar”=>; "application/x-ustar",
  163. "vcf" =>; "text/x-vcard",
  164. "vrml" =>; "x-world/x-vrml",
  165. "wav" =>; "音訊/x-wav",
  166. "wcm" =>; "application/vnd.ms-works",
  167. "wdb" =>; "application/vnd.ms-works",
  168. "wks" =>; "application/vnd.ms-works",
  169. "wmf" =>; "application/x-msmetafile",
  170. "wps" =>; "application/vnd.ms-works",
  171. "wri" =>; "application/x-mswrite",
  172. "wrl" =>; "x-world/x-vrml",
  173. "wrz" =>; "x-world/x-vrml",
  174. "xaf" =>; "x-world/x-vrml",
  175. "xbm" =>; "image/x-xbitmap",
  176. "xla" =>; "application/vnd.ms-excel",
  177. "xlc" =>; "application/vnd.ms-excel",
  178. "xlm" =>; "application/vnd.ms-excel",
  179. "xls" =>; "application/vnd.ms-excel",
  180. "xlt" =>; "application/vnd.ms-excel",
  181. "xlw" =>; "application/vnd.ms-excel",
  182. "xof" =>; "x-world/x-vrml",
  183. "xpm" =>; "image/x-xpixmap",
  184. "xwd" =>; "image/x-xwindowdump",
  185. "z" =>; "application/x-compress",
  186. "zip" =>; "application/zip");
複製程式碼

PHP、MIME


相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板