BVB Source Codes

Ali cloud storage v1.1 PHP file upload system root directory Show mimetypes.class.php Source code

Return Download Ali cloud storage v1.1 PHP file upload system root directory: download mimetypes.class.php Source code - Download Ali cloud storage v1.1 PHP file upload system root directory Source code - Type:.php
  1. <?php
  2. /**
  3.  * 获得文件的mime type类型
  4.  * @author xiaobing.meng
  5.  *
  6.  */
  7. class MimeTypes {
  8.         public static $mime_types = array (
  9.                         '3gp' => 'video/3gpp', 'ai' => 'application/postscript',
  10.                         'aif' => 'audio/x-aiff', 'aifc' => 'audio/x-aiff',
  11.                         'aiff' => 'audio/x-aiff', 'asc' => 'text/plain',
  12.                         'atom' => 'application/atom+xml', 'au' => 'audio/basic',
  13.                         'avi' => 'video/x-msvideo', 'bcpio' => 'application/x-bcpio',
  14.                         'bin' => 'application/octet-stream', 'bmp' => 'image/bmp',
  15.                         'cdf' => 'application/x-netcdf', 'cgm' => 'image/cgm',
  16.                         'class' => 'application/octet-stream',
  17.                         'cpio' => 'application/x-cpio',
  18.                         'cpt' => 'application/mac-compactpro',
  19.                         'csh' => 'application/x-csh', 'css' => 'text/css',
  20.                         'dcr' => 'application/x-director', 'dif' => 'video/x-dv',
  21.                         'dir' => 'application/x-director', 'djv' => 'image/vnd.djvu',
  22.                         'djvu' => 'image/vnd.djvu',
  23.                         'dll' => 'application/octet-stream',
  24.                         'dmg' => 'application/octet-stream',
  25.                         'dms' => 'application/octet-stream',
  26.                         'doc' => 'application/msword', 'dtd' => 'application/xml-dtd',
  27.                         'dv' => 'video/x-dv', 'dvi' => 'application/x-dvi',
  28.                         'dxr' => 'application/x-director',
  29.                         'eps' => 'application/postscript', 'etx' => 'text/x-setext',
  30.                         'exe' => 'application/octet-stream',
  31.                         'ez' => 'application/andrew-inset', 'flv' => 'video/x-flv',
  32.                         'gif' => 'image/gif', 'gram' => 'application/srgs',
  33.                         'grxml' => 'application/srgs+xml',
  34.                         'gtar' => 'application/x-gtar', 'gz' => 'application/x-gzip',
  35.                         'hdf' => 'application/x-hdf',
  36.                         'hqx' => 'application/mac-binhex40', 'htm' => 'text/html',
  37.                         'html' => 'text/html', 'ice' => 'x-conference/x-cooltalk',
  38.                         'ico' => 'image/x-icon', 'ics' => 'text/calendar',
  39.                         'ief' => 'image/ief', 'ifb' => 'text/calendar',
  40.                         'iges' => 'model/iges', 'igs' => 'model/iges',
  41.                         'jnlp' => 'application/x-java-jnlp-file', 'jp2' => 'image/jp2',
  42.                         'jpe' => 'image/jpeg', 'jpeg' => 'image/jpeg',
  43.                         'jpg' => 'image/jpeg', 'js' => 'application/x-javascript',
  44.                         'kar' => 'audio/midi', 'latex' => 'application/x-latex',
  45.                         'lha' => 'application/octet-stream',
  46.                         'lzh' => 'application/octet-stream',
  47.                         'm3u' => 'audio/x-mpegurl', 'm4a' => 'audio/mp4a-latm',
  48.                         'm4p' => 'audio/mp4a-latm', 'm4u' => 'video/vnd.mpegurl',
  49.                         'm4v' => 'video/x-m4v', 'mac' => 'image/x-macpaint',
  50.                         'man' => 'application/x-troff-man',
  51.                         'mathml' => 'application/mathml+xml',
  52.                         'me' => 'application/x-troff-me', 'mesh' => 'model/mesh',
  53.                         'mid' => 'audio/midi', 'midi' => 'audio/midi',
  54.                         'mif' => 'application/vnd.mif', 'mov' => 'video/quicktime',
  55.                         'movie' => 'video/x-sgi-movie', 'mp2' => 'audio/mpeg',
  56.                         'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4',
  57.                         'mpe' => 'video/mpeg', 'mpeg' => 'video/mpeg',
  58.                         'mpg' => 'video/mpeg', 'mpga' => 'audio/mpeg',
  59.                         'ms' => 'application/x-troff-ms', 'msh' => 'model/mesh',
  60.                         'mxu' => 'video/vnd.mpegurl', 'nc' => 'application/x-netcdf',
  61.                         'oda' => 'application/oda', 'ogg' => 'application/ogg',
  62.                         'ogv' => 'video/ogv', 'pbm' => 'image/x-portable-bitmap',
  63.                         'pct' => 'image/pict', 'pdb' => 'chemical/x-pdb',
  64.                         'pdf' => 'application/pdf',
  65.                         'pgm' => 'image/x-portable-graymap',
  66.                         'pgn' => 'application/x-chess-pgn', 'pic' => 'image/pict',
  67.                         'pict' => 'image/pict', 'png' => 'image/png',
  68.                         'pnm' => 'image/x-portable-anymap',
  69.                         'pnt' => 'image/x-macpaint', 'pntg' => 'image/x-macpaint',
  70.                         'ppm' => 'image/x-portable-pixmap',
  71.                         'ppt' => 'application/vnd.ms-powerpoint',
  72.                         'ps' => 'application/postscript', 'qt' => 'video/quicktime',
  73.                         'qti' => 'image/x-quicktime', 'qtif' => 'image/x-quicktime',
  74.                         'ra' => 'audio/x-pn-realaudio',
  75.                         'ram' => 'audio/x-pn-realaudio', 'ras' => 'image/x-cmu-raster',
  76.                         'rdf' => 'application/rdf+xml', 'rgb' => 'image/x-rgb',
  77.                         'rm' => 'application/vnd.rn-realmedia',
  78.                         'roff' => 'application/x-troff', 'rtf' => 'text/rtf',
  79.                         'rtx' => 'text/richtext', 'sgm' => 'text/sgml',
  80.                         'sgml' => 'text/sgml', 'sh' => 'application/x-sh',
  81.                         'shar' => 'application/x-shar', 'silo' => 'model/mesh',
  82.                         'sit' => 'application/x-stuffit',
  83.                         'skd' => 'application/x-koan', 'skm' => 'application/x-koan',
  84.                         'skp' => 'application/x-koan', 'skt' => 'application/x-koan',
  85.                         'smi' => 'application/smil', 'smil' => 'application/smil',
  86.                         'snd' => 'audio/basic', 'so' => 'application/octet-stream',
  87.                         'spl' => 'application/x-futuresplash',
  88.                         'src' => 'application/x-wais-source',
  89.                         'sv4cpio' => 'application/x-sv4cpio',
  90.                         'sv4crc' => 'application/x-sv4crc', 'svg' => 'image/svg+xml',
  91.                         'swf' => 'application/x-shockwave-flash',
  92.                         't' => 'application/x-troff', 'tar' => 'application/x-tar',
  93.                         'tcl' => 'application/x-tcl', 'tex' => 'application/x-tex',
  94.                         'texi' => 'application/x-texinfo',
  95.                         'texinfo' => 'application/x-texinfo', 'tif' => 'image/tiff',
  96.                         'tiff' => 'image/tiff', 'tr' => 'application/x-troff',
  97.                         'tsv' => 'text/tab-separated-values', 'txt' => 'text/plain',
  98.                         'ustar' => 'application/x-ustar',
  99.                         'vcd' => 'application/x-cdlink', 'vrml' => 'model/vrml',
  100.                         'vxml' => 'application/voicexml+xml', 'wav' => 'audio/x-wav',
  101.                         'wbmp' => 'image/vnd.wap.wbmp',
  102.                         'wbxml' => 'application/vnd.wap.wbxml', 'webm' => 'video/webm',
  103.                         'wml' => 'text/vnd.wap.wml',
  104.                         'wmlc' => 'application/vnd.wap.wmlc',
  105.                         'wmls' => 'text/vnd.wap.wmlscript',
  106.                         'wmlsc' => 'application/vnd.wap.wmlscriptc',
  107.                         'wmv' => 'video/x-ms-wmv', 'wrl' => 'model/vrml',
  108.                         'xbm' => 'image/x-xbitmap', 'xht' => 'application/xhtml+xml',
  109.                         'xhtml' => 'application/xhtml+xml',
  110.                         'xls' => 'application/vnd.ms-excel',
  111.                         'xml' => 'application/xml', 'xpm' => 'image/x-xpixmap',
  112.                         'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml',
  113.                         'xul' => 'application/vnd.mozilla.xul+xml',
  114.                         'xwd' => 'image/x-xwindowdump', 'xyz' => 'chemical/x-xyz',
  115.                         'zip' => 'application/zip' );
  116.        
  117.         public static function get_mimetype($ext) {
  118.                 return (isset ( self::$mime_types [$ext] ) ? self::$mime_types [$ext] : 'application/octet-stream');
  119.         }
  120. }
  121.  
downloadmimetypes.class.php Source code - Download Ali cloud storage v1.1 PHP file upload system root directory Source code
Related Source Codes/Software:
Qr code generation V1.1 online - Directions for use: 2016-10-23
Short url program V1.2 (with black and white list function) - This short url program has three features: 2016-10-22
V2.0 Openbiz Cubi PHP rapid development platform - Openbiz Cubi is a PHP-based open source rapid appl... 2016-10-22
At half past eight self-help chain utf-8 v1.0 - Installation instructions After downloading befor... 2016-10-22
New Yorker rat taobao station group management system v2.0 - Rats off Amoy Taobao station management system 2.0... 2016-10-22
Desert arashi v0.1.2 file operations procedures - Desert arashi file operations procedures is a simp... 2016-10-23
Good business mall v2.0 open source edition - Good business, open source shopping mall, which is... 2016-10-23
Easy website system v2.0 - Business easy built station system (Sunnyi Website... 2016-10-23
Emlog for SAE v4.2.1 - Emlog for SAE is suitable for SAE emlog used modif... 2016-10-23
Food science and technology chain edition v1.1 online reservation system - Treat chain version of the main functions of the o... 2016-10-23
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top