php MIMEタイプ配列

WBOY
リリース: 2016-07-25 08:43:08
オリジナル
783 人が閲覧しました

この配列には一般的な MIME タイプが含まれており、ファイルをダウンロードする必要がある場合は、この配列を通じてファイル拡張子をチェックして、ダウンロードできるかどうかを判断できます。

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

php、MIME


関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート