PHP header sets the common file type of Content-type,
In PHP, you can send header information through the header function, you can also set the file Content-type, the following collation of some common file types for the Content-type value.
Date 2015-06-22//defines the coded header (' content-type:text/html;charset=utf-8 '); Atomheader (' Content-type:application/atom+xml '); Cssheader (' content-type:text/css '); Javascriptheader (' Content-type:text/javascript '); JPEG imageheader (' content-type:image/jpeg '); Jsonheader (' Content-type:application/json '); Pdfheader (' content-type:application/pdf '); Rssheader (' content-type:application/rss+xml; charset=iso-8859-1 '); Text (Plain) header (' Content-type:text/plain '); Xmlheader (' Content-type:text/xml '); Okheader (' http/1.1 OK '); Set a 404 Header: Header (' http/1.1 404 Not Found '); Set the address to be permanently redirected to the header (' http/1.1 301 Moved permanently '); Go to a new address header (' location:http://www.example.org/'); File Delay Steering: header (' refresh:10; url=http://www.example.org/');p rint ' You'll be redirected in seconds '; Of course, you can also use HTML syntax to implement//
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/1021088.html www.bkjia.com true http://www.bkjia.com/PHPjc/1021088.html techarticle PHP Header Set common file types of Content-type, in PHP can be sent through the header function headers, you can also set the file Content-type, the following collation of some common file classes ...