Http://blog.9cbs.net/kingerq/archive/2004/11/22/190897.aspx 1, role: ~~~~~~~~~ PHP is only sent to the html document header with HTTP protocol In order to tell the browser how to deal with this page, as for the content of the transfer, you need to be familiar with the HTTP protocol. It has nothing to do with PHP. You can refer to http://www.w3.org/protocols/rfc2616/rfc2616. The traditional header must contain one of the three headers below and can only appear once. Location: xxxx: yyyy / zzzz content-type: xxxx / yyyy status: nnn xxxxx ie, first understand the way HTTP protocol work mode ~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ HTTP protocol is based on request / response. After a client is connected to the server, send a request to the server, the request method, the unified resource identifier, the protocol version number, and the MIME information includes request modifiers, client information, and possible content. After the server is connected, the corresponding response information is given, the format is a state line including the protocol version number, a successful or error code, and the MIME information includes server information, entity information, and possible content. It is divided into four processes. In the HTTP protocol, the server refers to the part of the HTTP service, and the client refers to the browser or download tool you use. When communicating, a request connection is issued by the client, and the server is established; then, the client issues an HTTP request (Request), the server returns the response information (respond), thereby completing an HTTP operation. Third, the HTTP protocol status code means means ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 × × 保 2 × × indicates successful reception of 3 ×× To complete the request customer needs to further refine request 4 ×× Customer error 5 ×× server error four, operation example: ~~~~~~~~~~~~~ <1> redirect function, this most common php header ("location: http://www.php.net");?> <2> Forced users to get the latest information every time you access this page, not the cache where the client is used. Php // Tell the browser's expiration time (represented by Greenwich time), as long as it has passed the date.