- /**
- * 파일의 MIME 유형을 가져옵니다.
- * @author xiaobing.meng
- *
- */
- class MimeTypes {
- public static $mime_types = array(
- 'apk' = > 'application/vnd.android.package-archive',
- '3gp' => 'video/3gpp',
- 'ai' => '응용 프로그램/포스트스크립트',
- 'aif' => '오디오/x-aiff',
- 'aifc' => '오디오/x-aiff',
- 'aiff' => '오디오/x-aiff',
- 'asc ' => '텍스트/일반',
- 'atom' => 'application/atom xml',
- 'au' => 'audio/basic',
- 'avi' => 'video/x-msvideo',
- 'bcpio' => 'application/x-bcpio',
- 'bin' => 'application/octet-stream',
- 'bmp' => ; '이미지/bmp',
- 'cdf' => 'application/x-netcdf',
- 'cgm' => '이미지/cgm',
- '클래스' => /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' => '응용프로그램/옥텟-스트림',
- 'dmg' => '애플리케이션/옥텟-스트림',
- 'dms' => '응용프로그램/옥텟-스트림',
- 'doc' => '응용 프로그램/msword',
- 'dtd' => 'application/xml-dtd',
- 'dv' => '비디오/x-dv',
- 'dvi' => 'application/x-dvi',
- 'dxr' => 'application/x-director',
- 'eps' => '응용프로그램/포스트스크립트',
- 'etx' => 'text/x-setext',
- 'exe' => '애플리케이션/옥텟-스트림',
- 'ez' => 'application/andrew-inset',
- 'flv' => '동영상/x-flv',
- 'gif' => '이미지/gif',
- '그램' => 'application/srgs',
- 'grxml' => 'application/srgs xml',
- 'gtar' => 'application/x-gtar',
- 'gz' => 'application/x-gzip',
- 'hdf' => 'application/x-hdf',
- 'hqx' => 'application/mac-binhex40',
- 'htm' => '텍스트/html',
- 'html' => 'text/html',
- '얼음' => 'x-conference/x-cooltalk',
- 'ico' => '이미지/x-아이콘',
- 'ics' => '문자/캘린더',
- 'ief' => '이미지/ief',
- 'ifb' => '텍스트/캘린더',
- 'iges' => '모델/iges',
- 'igs' => '모델/iges',
- 'jnlp' => 'application/x-java-jnlp-file',
- 'jp2' => '이미지/jp2',
- 'jpe' => '이미지/jpeg',
- 'jpeg' => '이미지/jpeg',
- 'jpg' => '이미지/jpeg',
- 'js' => 'application/x-javascript',
- 'kar' => '오디오/미디',
- '라텍스' => 'application/x-latex',
- 'lha' => '애플리케이션/옥텟-스트림',
- 'lzh' => '응용프로그램/옥텟-스트림',
- 'm3u' => 'audio/x-mpegurl',
- 'm4a' => 'audio/mp4a-latm',
- 'm4p' => 'audio/mp4a-latm',
- 'm4u' => 'video/vnd.mpegurl',
- 'm4v' => 'video/x-m4v',
- 'mac' => 'image/x-macpaint',
- '남자' => 'application/x-troff-man',
- 'mathml' => 'application/mathml xml',
- '나' => 'application/x-troff-me',
- 'mesh' => '모델/메시',
- '중간' => '오디오/미디',
- '미디' => '오디오/미디',
- 'mif' => 'application/vnd.mif',
- 'mov' => '동영상/퀵타임',
- '영화' => 'video/x-sgi-movie',
- 'mp2' => '오디오/mpeg',
- 'mp3' => '오디오/mpeg',
- 'mp4' => '동영상/mp4',
- 'mpe' => '비디오/mpeg',
- 'mpeg' => '비디오/mpeg',
- 'mpg' => '비디오/mpeg',
- 'mpga' => '오디오/mpeg',
- 'ms' => 'application/x-troff-ms',
- 'msh' => '모델/메시',
- 'mxu' => 'video/vnd.mpegurl',
- 'nc' => 'application/x-netcdf',
- 'oda' => '애플리케이션/오다',
- 'ogg' => '애플리케이션/ogg',
- 'ogv' => '동영상/ogv',
- 'pbm' => 'image/x-portable-bitmap',
- 'pct' => '이미지/그림',
- 'pdb' => '화학/x-pdb',
- 'pdf' => '응용프로그램/pdf',
- 'pgm' => 'image/x-portable-graymap',
- 'pgn' => 'application/x-chess-pgn',
- 'pic' => '이미지/그림',
- '그림' => '이미지/그림',
- 'png' => '이미지/png',
- 'pnm' => 'image/x-portable-anymap',
- 'pnt' => 'image/x-macpaint',
- 'pntg' => '이미지/x-macpaint',
- 'ppm' => 'image/x-portable-pixmap',
- 'ppt' => 'application/vnd.ms-powerpoint',
- 'ps' => '응용 프로그램/포스트스크립트',
- 'qt' => '동영상/퀵타임',
- 'qti' => '이미지/x-quicktime',
- 'qtif' => '이미지/x-quicktime',
- 'ra' => 'audio/x-pn-realaudio',
- 'ram' => 'audio/x-pn-realaudio',
- 'ras' => 'image/x-cmu-raster',
- 'rdf' => 'application/rdf xml',
- 'rgb' => '이미지/x-rgb',
- 'rm' => 'application/vnd.rn-realmedia',
- 'roff' => 'application/x-troff',
- 'rtf' => '텍스트/rtf',
- 'rtx' => '텍스트/리치텍스트',
- 'sgm' => '텍스트/sgml',
- 'sgml' => 'text/sgml',
- 'sh' => 'application/x-sh',
- 'shar' => 'application/x-shar',
- '사일로' => '모델/메시',
- '앉아' => 'application/x-stuffit',
- 'skd' => 'application/x-koan',
- 'skm' => 'application/x-koan',
- 'skp' => 'application/x-koan',
- 'skt' => 'application/x-koan',
- 'smi' => '애플리케이션/smil',
- 'smil' => '애플리케이션/smil',
- 'snd' => '오디오/기본',
- '그래서' => '애플리케이션/옥텟-스트림',
- 'spl' => 'application/x-futuresplash',
- 'src' => 'application/x-wais-source',
- 'sv4cpio' => 'application/x-sv4cpio',
- 'sv4crc' => 'application/x-sv4crc',
- 'svg' => '이미지/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' => '이미지/tiff',
- 'tiff' => 'image/tiff',
- 'tr' => 'application/x-troff',
- 'tsv' => '텍스트/탭으로 구분된 값',
- 'txt' => '텍스트/일반',
- 'ustar' => 'application/x-ustar',
- 'vcd' => 'application/x-cdlink',
- 'vrml' => '모델/vrml',
- 'vxml' => 'application/voicexml xml',
- 'wav' => '오디오/x-wav',
- 'wbmp' => 'image/vnd.wap.wbmp',
- 'wbxml' => 'application/vnd.wap.wbxml',
- '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' => '모델/vrml',
- 'xbm' => '이미지/x-xbitmap',
- 'xht' => 'application/xhtml xml',
- 'xhtml' => 'application/xhtml xml',
- 'xls' => 'application/vnd.ms-excel',
- 'xml' => 'application/xml',
- 'xpm' => '이미지/x-xpixmap',
- 'xsl' => 'application/xml',
- 'xslt' => 'application/xslt xml',
- 'xul' => 'application/vnd.mozilla.xul xml',
- 'xwd' => '이미지/x-xwindowdump',
- 'xyz' => '화학물질/x-xyz',
- 'zip' => 'application/zip' );
-
- 공개 정적 함수 get_mimetype($ext) {
- return (isset ( self::$mime_types [$ext] ) ? self::$mime_types [$ext] : '애플리케이션/옥텟-스트림');
- }
- }
-
复代码
|