亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 語言 > PHP > 正文

PHP實現的獲取文件mimes類型工具類示例

2024-05-05 00:03:09
字體:
來源:轉載
供稿:網友

本文實例講述了PHP實現的獲取文件mimes類型工具類。分享給大家供大家參考,具體如下:

<?php/* * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. *//*%******************************************************************************************%*/// CLASS/** * Simplifies the process of looking up the content-types for a variety of file extensions. * * @version 2010.07.20 * @license See the included NOTICE.md file for more information. * @copyright See the included NOTICE.md file for more information. * @link http://aws.amazon.com/php/ PHP Developer Center */class CFMimeTypes{  /**   * Map of the extension-to-mime-types that we support.   */  public static $mime_types = array(    '3gp' => 'video/3gpp',    'ai' => 'application/postscript',    'aif' => 'audio/x-aiff',    'aifc' => 'audio/x-aiff',    'aiff' => 'audio/x-aiff',    'asc' => 'text/plain',    'atom' => 'application/atom+xml',    'au' => 'audio/basic',    'avi' => 'video/x-msvideo',    'bcpio' => 'application/x-bcpio',    'bin' => 'application/octet-stream',    'bmp' => 'image/bmp',    'cdf' => 'application/x-netcdf',    'cgm' => 'image/cgm',    'class' => 'application/octet-stream',    'cpio' => 'application/x-cpio',    'cpt' => 'application/mac-compactpro',    'csh' => 'application/x-csh',    'css' => 'text/css',    'dcr' => 'application/x-director',    'dif' => 'video/x-dv',    'dir' => 'application/x-director',    'djv' => 'image/vnd.djvu',    'djvu' => 'image/vnd.djvu',    'dll' => 'application/octet-stream',    'dmg' => 'application/octet-stream',    'dms' => 'application/octet-stream',    'doc' => 'application/msword',    'dtd' => 'application/xml-dtd',    'dv' => 'video/x-dv',    'dvi' => 'application/x-dvi',    'dxr' => 'application/x-director',    'eps' => 'application/postscript',    'etx' => 'text/x-setext',    'exe' => 'application/octet-stream',    'ez' => 'application/andrew-inset',    'flv' => 'video/x-flv',    'gif' => 'image/gif',    'gram' => 'application/srgs',    'grxml' => 'application/srgs+xml',    'gtar' => 'application/x-gtar',    'gz' => 'application/x-gzip',    'hdf' => 'application/x-hdf',    'hqx' => 'application/mac-binhex40',    'htm' => 'text/html',    'html' => 'text/html',    'ice' => 'x-conference/x-cooltalk',    'ico' => 'image/x-icon',    'ics' => 'text/calendar',    'ief' => 'image/ief',    'ifb' => 'text/calendar',    'iges' => 'model/iges',    'igs' => 'model/iges',    'jnlp' => 'application/x-java-jnlp-file',    'jp2' => 'image/jp2',    'jpe' => 'image/jpeg',    'jpeg' => 'image/jpeg',    'jpg' => 'image/jpeg',    'js' => 'application/x-javascript',    'kar' => 'audio/midi',    'latex' => 'application/x-latex',    'lha' => 'application/octet-stream',    'lzh' => 'application/octet-stream',    'm3u' => 'audio/x-mpegurl',    'm4a' => 'audio/mp4a-latm',    'm4p' => 'audio/mp4a-latm',    'm4u' => 'video/vnd.mpegurl',    'm4v' => 'video/x-m4v',    'mac' => 'image/x-macpaint',    'man' => 'application/x-troff-man',    'mathml' => 'application/mathml+xml',    'me' => 'application/x-troff-me',    'mesh' => 'model/mesh',    'mid' => 'audio/midi',    'midi' => 'audio/midi',    'mif' => 'application/vnd.mif',    'mov' => 'video/quicktime',    'movie' => 'video/x-sgi-movie',    'mp2' => 'audio/mpeg',    'mp3' => 'audio/mpeg',    'mp4' => 'video/mp4',    'mpe' => 'video/mpeg',    'mpeg' => 'video/mpeg',    'mpg' => 'video/mpeg',    'mpga' => 'audio/mpeg',    'ms' => 'application/x-troff-ms',    'msh' => 'model/mesh',    'mxu' => 'video/vnd.mpegurl',    'nc' => 'application/x-netcdf',    'oda' => 'application/oda',    'ogg' => 'application/ogg',    'ogv' => 'video/ogv',    'pbm' => 'image/x-portable-bitmap',    'pct' => 'image/pict',    'pdb' => 'chemical/x-pdb',    'pdf' => 'application/pdf',    'pgm' => 'image/x-portable-graymap',    'pgn' => 'application/x-chess-pgn',    'pic' => 'image/pict',    'pict' => 'image/pict',    'png' => 'image/png',    'pnm' => 'image/x-portable-anymap',    'pnt' => 'image/x-macpaint',    'pntg' => 'image/x-macpaint',    'ppm' => 'image/x-portable-pixmap',    'ppt' => 'application/vnd.ms-powerpoint',    'ps' => 'application/postscript',    'qt' => 'video/quicktime',    'qti' => 'image/x-quicktime',    'qtif' => 'image/x-quicktime',    'ra' => 'audio/x-pn-realaudio',    'ram' => 'audio/x-pn-realaudio',    'ras' => 'image/x-cmu-raster',    'rdf' => 'application/rdf+xml',    'rgb' => 'image/x-rgb',    'rm' => 'application/vnd.rn-realmedia',    'roff' => 'application/x-troff',    'rtf' => 'text/rtf',    'rtx' => 'text/richtext',    'sgm' => 'text/sgml',    'sgml' => 'text/sgml',    'sh' => 'application/x-sh',    'shar' => 'application/x-shar',    'silo' => 'model/mesh',    'sit' => 'application/x-stuffit',    'skd' => 'application/x-koan',    'skm' => 'application/x-koan',    'skp' => 'application/x-koan',    'skt' => 'application/x-koan',    'smi' => 'application/smil',    'smil' => 'application/smil',    'snd' => 'audio/basic',    'so' => 'application/octet-stream',    'spl' => 'application/x-futuresplash',    'src' => 'application/x-wais-source',    'sv4cpio' => 'application/x-sv4cpio',    'sv4crc' => 'application/x-sv4crc',    'svg' => 'image/svg+xml',    'swf' => 'application/x-shockwave-flash',    't' => 'application/x-troff',    'tar' => 'application/x-tar',    'tcl' => 'application/x-tcl',    'tex' => 'application/x-tex',    'texi' => 'application/x-texinfo',    'texinfo' => 'application/x-texinfo',    'tif' => 'image/tiff',    'tiff' => 'image/tiff',    'tr' => 'application/x-troff',    'tsv' => 'text/tab-separated-values',    'txt' => 'text/plain',    'ustar' => 'application/x-ustar',    'vcd' => 'application/x-cdlink',    'vrml' => 'model/vrml',    'vxml' => 'application/voicexml+xml',    'wav' => 'audio/x-wav',    'wbmp' => 'image/vnd.wap.wbmp',    'wbxml' => 'application/vnd.wap.wbxml',    'webm' => 'video/webm',    'wml' => 'text/vnd.wap.wml',    'wmlc' => 'application/vnd.wap.wmlc',    'wmls' => 'text/vnd.wap.wmlscript',    'wmlsc' => 'application/vnd.wap.wmlscriptc',    'wmv' => 'video/x-ms-wmv',    'wrl' => 'model/vrml',    'xbm' => 'image/x-xbitmap',    'xht' => 'application/xhtml+xml',    'xhtml' => 'application/xhtml+xml',    'xls' => 'application/vnd.ms-excel',    'xml' => 'application/xml',    'xpm' => 'image/x-xpixmap',    'xsl' => 'application/xml',    'xslt' => 'application/xslt+xml',    'xul' => 'application/vnd.mozilla.xul+xml',    'xwd' => 'image/x-xwindowdump',    'xyz' => 'chemical/x-xyz',    'zip' => 'application/zip',  );  /**   * Attempt to match the file extension to a known mime-type.   *   * @param string $ext (Required) The file extension to attempt to map.   * @return string The mime-type to use for the file extension.   */  public static function get_mimetype($ext)  {    $ext = strtolower($ext); // Make sure the passed in extension is lowercase    return isset(self::$mime_types[$ext]) ? self::$mime_types[$ext] : 'application/octet-stream';  }}

希望本文所述對大家PHP程序設計有所幫助。


注:相關教程知識閱讀請移步到PHP教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
国产精品白丝av嫩草影院| 欧美亚洲国产成人精品| 欧美大片免费看| 欧美最近摘花xxxx摘花| 欧美成人精品一区二区| 第一福利永久视频精品| 日本精品免费一区二区三区| 中国人与牲禽动交精品| 国产在线精品一区免费香蕉| 亚洲最新av网址| 亚洲国产精品久久久久秋霞蜜臀| 国产精品国产亚洲伊人久久| 日韩a**站在线观看| 日韩毛片在线观看| 性欧美长视频免费观看不卡| 岛国精品视频在线播放| 久久久久久91香蕉国产| 国产精品入口免费视频一| 色综合色综合久久综合频道88| 亚洲国产精品资源| 国产精品爽爽ⅴa在线观看| 亚洲www在线观看| 欧美理论片在线观看| 97精品国产97久久久久久免费| 亚洲欧洲av一区二区| 三级精品视频久久久久| 亚洲人成网站色ww在线| 国产成人福利夜色影视| 久久精品国产96久久久香蕉| 亚洲三级 欧美三级| 日韩精品日韩在线观看| 国产+成+人+亚洲欧洲| 久久精品99久久久久久久久| 国产成人中文字幕| 久久69精品久久久久久久电影好| 日韩视频亚洲视频| 国模视频一区二区三区| 精品久久久久久久久久国产| 97超碰蝌蚪网人人做人人爽| 国产精品久久久久久亚洲影视| 国产欧美日韩精品专区| 国产精品福利片| 国内精品中文字幕| 亚洲成人av资源网| 亚洲国产成人精品女人久久久| 色综合久久88色综合天天看泰| 日韩欧美在线中文字幕| 日本a级片电影一区二区| 欧洲成人免费视频| 中文字幕日韩av| 欧美亚洲在线观看| 精品久久久精品| 成人高清视频观看www| 亚洲综合av影视| 亚洲午夜久久久久久久| 欧美精品中文字幕一区| 国产成人自拍视频在线观看| 91sao在线观看国产| 2019中文字幕在线免费观看| 久久偷看各类女兵18女厕嘘嘘| 欧美黑人极品猛少妇色xxxxx| 中文字幕亚洲欧美| 国产精品自产拍在线观看中文| 欧美网站在线观看| 深夜福利日韩在线看| 久久久久北条麻妃免费看| 亚洲美女福利视频网站| 精品国内产的精品视频在线观看| 在线a欧美视频| 国产精品久久不能| 欧美一性一乱一交一视频| 国产精品麻豆va在线播放| 97国产一区二区精品久久呦| 国产精品一区二区三区久久久| 一区二区三区回区在观看免费视频| 国产精品视频久久久久| 国产成+人+综合+亚洲欧洲| 色先锋久久影院av| 欧美性猛交xxxx偷拍洗澡| 九九热这里只有精品免费看| 国产97在线|日韩| 91在线精品视频| 国产ts一区二区| 精品久久久久久中文字幕大豆网| 国产欧美一区二区三区四区| 欧美亚洲日本网站| 精品国产网站地址| 久久久在线视频| 亚洲乱码国产乱码精品精| 曰本色欧美视频在线| 亚洲精品国偷自产在线99热| 最近的2019中文字幕免费一页| 亚洲精品久久久久国产| 欧美一级电影久久| 亚洲欧美国产日韩中文字幕| 国产精品观看在线亚洲人成网| 国产精品久久久久久久久粉嫩av| 久久国产精品电影| 伊人久久男人天堂| 川上优av一区二区线观看| 亚洲国产精品va在线看黑人动漫| 亚洲一区二区三区四区在线播放| 精品人伦一区二区三区蜜桃免费| 美日韩丰满少妇在线观看| 亚洲天堂久久av| 日韩av在线免费| 91久久在线播放| 久久久免费电影| 992tv成人免费影院| 亚洲japanese制服美女| 亚洲黄页视频免费观看| 国产精品久久久久久av福利软件| 亚洲成人激情在线| 亚洲一区亚洲二区亚洲三区| 国产精自产拍久久久久久蜜| 久久久999精品免费| 菠萝蜜影院一区二区免费| 欧美极品美女电影一区| 国产亚洲精品日韩| 日韩av成人在线| 日韩在线观看免费全| 亚洲xxxx做受欧美| 中文字幕日韩av综合精品| 欧美日韩国产色视频| 色爱av美腿丝袜综合粉嫩av| 亚洲精品成人av| 青草青草久热精品视频在线网站| 国产一区二区久久精品| 日本精品视频网站| 黄色成人在线播放| 91九色视频在线| 国产精品96久久久久久又黄又硬| 国产精品69精品一区二区三区| 国产精品久久av| 欧美人与性动交a欧美精品| 久久综合免费视频| 欧美日韩亚洲网| 蜜臀久久99精品久久久久久宅男| 亚洲精品永久免费精品| 91视频免费在线| 亚洲精品wwww| 久久久亚洲精品视频| 色偷偷91综合久久噜噜| 97国产在线视频| 亚洲福利视频久久| 欧美中文字幕在线| 日韩视频在线观看免费| 日韩不卡中文字幕| 国产日韩在线免费| 成人激情视频网| 美女av一区二区三区| 欧美精品18videos性欧美| 国产精品爱久久久久久久| 色无极影院亚洲| 久久久免费精品视频| 国模视频一区二区| 国产高清在线不卡| 国产精品美女主播| 成人免费福利视频| 久久久久久久影视| 18一19gay欧美视频网站| 51久久精品夜色国产麻豆| 欧美精品久久久久久久久| 国产精彩精品视频|