August 2003
Intermediate to advanced
1104 pages
19h 27m
English
By default, PHP sends an HTTP header specifying the document as being HTML. The Content-Type header specifies the MIME type text/html, and the browser interprets the code as HTML. Sometimes you will wish to create other types of documents with PHP. Chapter 25 discusses creating images, which may require an image/png content type. MIME types are administered by IANA, the Internet Assigned Numbers Authority. You can find a list of official media types at <http://www.isi.edu/in-notes/iana/assignments/media-types/>.
At times, you may wish to take advantage of how browsers react to different types of content. For example, text/plain displays in a fixed-width font with no interpretation of HTML. If you use */* for the content ...