Php Header collection author: zccst1, Webtext/html = & gt; html, htmtext/css = & gt; csstext/plain = & gt; text // important // (1) collect headers used by common text headers ("Content-type: text/plain; cha php
Author: zccst
1. Web
Text/html => html, htm
Text/css => css
Text/plain => text // important
// (1) normal text header ("Content-type: text/plain; charset = utf-8"); // example function response ($ arr) {$ json = json_encode ($ arr); header ("Content-type: text/plain; charset = utf-8"); print $ json ;}
2. document
Application/msword => doc
Application/vnd. ms-powerpoint => ppt
Application/vnd. ms-excel => xls
Application/pdf => pdf
Application/zip => zip
Application/x-tar => tar
// (1) export the csv format header ("Content-type: text/csv; charset = utf-8"); header ("Content-Disposition: filename=tititle=.csv "); print iconv ('utf-8', 'gb2312 // IGNORE ', $ str );
3. images
Image/jpeg => jpeg, jpg, jpe, png
Image/gif => gif
Image/bmp => bmp
4. audio
Audio/x-wav => wav
Audio/mpeg => mp3, mp2, mpga
Audio/midi => mid, midi, kar
5. Video
Video/mpeg => mpeg, mpg, mpe
Video/quictime => qt, mov
Video/x-msvideo => avi
Video/x-sgi-movie => movie