Content-Type,內容類型,一般是指網頁中存在的Content-Type,用來定義網頁檔案的類型和網頁的編碼,決定瀏覽器將以什麼形式、什麼編碼讀拿這個文件,這就是為什麼經常看到一些Asp網頁點擊的結果卻是下載到的一個文件或一張圖片的原因。
HTTP content-type 對照表
| #檔案副檔名 | Content-Type(Mime-Type) | #檔案副檔名 | Content-Type(Mime-Type) |
|---|---|---|---|
| #.*(二進位流,不知道下載檔案類型) | application/octet-stream | .tif | image/tiff |
| .001 | application/x-001 | .301 | application/x-301 |
| #.323 | text/h323 | #.906 | application/x-906 |
| .907 | drawing/907 | .a11 | #application/ x-a11 |
| .acp | audio/x-mei-aac | .ai | application/postscript |
| .aif | audio/aiff | .aifc | audio/aiff |
| . aiff | audio/aiff | .anv | audio/aiff |
| application/x-anv | .asa | text /asa | |
| video/x-ms-asf | .asp | ##text/asp | |
| video/x-ms-asf | #.au | audio/basic | |
| video/avi | .awf | application/vnd.adobe.workflow | |
| text/ xml | .bmp | application/x-bmp | |
| application/x-bot | #.c4t | application/x-c4t | |
| application/x-c90 | #.cal | application/x-cals | |
| #application/vnd.ms-pki.seccat | . cdf | application/x-netcdf | |
| #application/x-cdr | .cel | #application/x-cel | |
| #application/x-x509-ca-cert | .cg4 | #application /x-g4 | |
| application/x-cgm | .cit | application/x-cit | |
| java/* | .cml | text/xml | ##.cmp|
| .cmx | #application/x-cmx | .cot | |
| .crl | application/pkix-crl | .crt | |
| .csi | application/x-csi | .css | |
| .cut | application/x-cut | .dbf | |
| ##.dbm | application/x-dbm | .dbx | |
| ##.dcd | #text /xml | .dcx | application/x-dcx |
| .der | application/x-x509-ca-cert | .dgn | application/x-dgn |
| #.dib | application/x-dib | # .dll | application/x-msdownload |
| .doc | application/msword | .dot | ## application/msword |
| .drw | application/x-drw | .dtd | text/xml |
| #.dwf | Model/vnd.dwf | .dwf | application/x-dwf |
| .dwg | application/x-dwg | .dxb | #application/x-dxb |
| .dxf | application/x-dxf | .edn | application/vnd.adobe.edn |
| #.emf | application/x-emf | .eml | message/rfc822 |
| .ent | text/xml | .epi | application/x-epi |
| .eps | application/x-ps | .eps | application/postscript |
| #.etd | application/x-ebx | ##.exeapplication/x-msdownload | |
| image/fax | .fdf | application/vnd .fdf | |
| application/fractals | .fo | text/xml | |
| application/x-frm | .g4 | application/x-g4 | |
| application/x-gbr | . | application/x- | |
| image/ gif | .gl2 | application/x-gl2 | |
| application/x-gp4 | #.hgl | application/x-hgl | |
| application/x-hmr | ##.hpgapplication/x-hpgl | .hpl | |
| .hqx | #application/mac -binhex40 | .hrf | |
| .hta | application/hta | .htc | |
| .htm | text/html | ##.html | |
| .htt | text/webviewhtml | .htx | |
| .icb | application/x-icb | #.ico | |
| 。 ico | application/x-ico | .iff | |
| #application/x-g4 | .igs | #application/x-igs | |
| application/x-iphone | .img | application/x-img | |
| application/x-internet-signup | #.isp | application/x-internet-signup | |
| video/x-ivf | #.java | java/* | |
| #image/jpeg | .jpe | image/jpeg | |
| application/x-jpe | .jpeg | image/jpeg | |
| image/jpeg | .jpg | application/x-jpg | |
| .jsp | #text/html | .la1 | |
| .lar | application/x-laplayer-reg | .latex | ##application/x-latex|
| .lavs | audio/x-liquid-secure | .lbm | application/x-lbm |
| #.lmsff | audio/x-la-lms | .ls | application/x-javascript |
| .mfp | application/x-shockwave-flash | .mht | message/rfc822 |
| # .mhtml | message/rfc822 | .mi | #application/x-mi |
| #音訊/mid | .midi | 音訊/mid | |
| application/x-mil | .mml | text/xml | |
| audio/x-musicnet-download | .mns | #audio/x-musicnet-stream | |
| application/x-javascript | .movie | # #video /x-sgi-電影 | |
| #音訊/mp1 | .mp2 | 音訊/mp2 | |
| 視訊/mpeg | .mp3 | 音訊/mp3 | |
| video/mpeg4 | .mpa | video/x-mpg | |
| application/ vnd.ms-project | .mpe | ||
| .mpeg | video/mpg | .mpg | |
| .mpga | 音訊/rn-mpeg | .mpp | |
| .mps | video/x-mpeg | .mpt | |
| .mpv | video/mpg | .mpv2 | |
| .mpw | application/vnd.ms-project | .mpx | |
| .mtx | text/xml | .mxp | |
| ## .net | image/pnetvue | .nrf | #application/x-nrf |
| .nws | # message/ rfc822 | .odc | text/x-ms-odc |
| .out | application/x-out | .p10 | application/pkcs10 |
| .p12 | application/x-pkcs12 | .p7b | application/x-pkcs7-certificates |
| #.p7c | application/pkcs7-mime | #.p7m | #application /pkcs7-mime |
| .p7r | application/x-pkcs7-certreqresp | #.p7s | application/pkcs7 -signature |
| .pc5 | application/x-pc5 | .pci | application/x-pci |
| #.pcl | application/x-pcl | .pcx | application/x-pcx |
| application/pdf | |||
| #application/pdf | .pdx | ||
| .prf | application/pics-rules | .prn | application/x-prn |
| .prt | application/x-prt | .ps | #application/x-ps |
| 。 ##application/postscript | .ptn | application/x-ptn | |
| application/vnd.ms- powerpoint | .r3t | text/vnd.rn-realtext3d | |
| audio/vnd.rn-realaudio | .ram | audio/x-pn-realaudio | |
| application/x-ras | # #.ratapplication/rat-file | .rdf | |
| ##.rec | application/vnd.rn-recording | .red | |
| .rgb | #application/x -rgb | .rjs | |
| .rjt | application/vnd.rn -realsystem-rjt | .rlc | |
| .rle | application/x-rle | .rm | |
| .rmf | application/vnd.adobe.rmf | .rmi | |
| .rmj | application/vnd.rn-realsystem-rmj | #.rmm | |
| .rmp | application/vnd.rn-rn_music_package | #.rms | |
| .rmvb | application/vnd.rn-realmedia-vbr | #.rmx | |
| #.rnx | application/vnd.rn-realplayer | #.rp | |
| .rpm | audio/x-pn-realaudio-plugin | #.rsml | |
| .rt | text/vnd.rn-realtext | ||
| ##.rtf | application/msword | ||
| #application/x-rtf | ##.rv | #video/vnd.rn-realvideo | .sam |
| .sat | application/ x-sat | .sdp | |
| #.sdw | application/x-sdw | # #.sit | |
| .slb | application/x-slb | .sld | |
| .slk | #drawing/x-slk | .smi | |
| .smil | application/smil | #.smk | |
| #.snd | 音訊/基本 | .sol | |
| .tg4 | application/x-tg4 | .tga | application/x-tga |
| # .tif | image/tiff | .tif | #application/x-tif |
| .tiff | |||
| ##映像/tiff | .tld | text/xml | |
| #.top | drawing/x-top | .torrent | application/x-bittorrent |
| .tsd | text/xml | .txt | #text/plain |
| .uin | application/x-icq | .uls | text/iuls |
| #.vcf | text/x-vcard | .vda | application/x-vda |
| .vdx | application/vnd.visio | .vml | text/xml |
| .vpg | #application/x-vpeg005 | .vsd | application/vnd.visio |
| .vsd | #application/x- vsd | .vss | application/vnd.visio |
| #.vst | application/vnd.visio | .vst | application/x-vst |
| .vsw | application/vnd.visio | ##.vsxapplication/vnd.visio | |
| application/vnd.visio | .vxml | #text/xml | |
| 音訊/wav | .wax | 音訊/x-ms-wax | |
| application/x-wb1 | .wb2 | application/x-wb2 | |
| # .wb3 | application/x-wb3 | ||
| image/vnd.wap.wbmp | .wiz | application/msword | |
| application/x-wk3 | .wk4 | #application/x- wk4 | |
| application/x-wkq | .wks | application/x-wks | |
| 視訊/x-ms-wm | .wma | 音訊/x-ms-wma | |
| application/x-ms-wmd | .wmf | application/x-wmf | |
| text/vnd.wap.wml | .wmv | video/x-ms-wmv | |
| #video/x-ms-wmx | .wmz | application/x-ms-wmz | |
| #application /x-wp6 | .wpd | application/x-wpd | |
| application/x-wpg | .wpl | application/vnd.ms-wpl | |
| application/x-wq1 | #.wr1 | application/x-wr1 | |
| application/x-wri | # .wrk | application/x-wrk | |
| #application/x-ws | ##.ws2 | #application/x-ws | |
| text/scriptlet | #.wsdl | #text/xml | |
| video/x-ms-wvx | #.xdp | application/vnd.adobe.xdp | |
| text/xml | .xfd | application/vnd.adobe.xfd | |
| application/vnd.adobe.xfdf | .xhtml | text/html | |
| .xquery | text/xml | .xsd | #text/xml |
| .xsl | text/xml | .xslt | text/xml |
| #.xwd | application/x-xwd | .x_b | application/x-x_b |
| #.sis | application/vnd.symbian.install | .sisx | application/vnd.symbian.install |
| #.x_t | application/x-x_t | #.ipa | application/vnd.iphone |
| .apk | application/vnd.android.package-archive | .xap | application/x-silverlight-app |












![PHP實戰開發極速入門: PHP快速創建[小型商業論壇]](https://img.php.cn/upload/course/000/000/035/5d27fb58823dc974.jpg)









