The header () function sends the original HTTP header to the client.
Copy CodeThe code is as follows:
200 normal state
Header (' http/1.1 OK ');
301 permanent Redirect, remember to add a redirect address at the back location: $url
Header (' http/1.1 301 Moved permanently ');
Redirect, in fact, is 302 temporary redirect
Header (' location:http://www.maiyoule.com/');
Settings page 304 Not modified
Header (' http/1.1 304 not Modified ');
Display the Login box,
Header (' http/1.1 401 Unauthorized ');
Header (' Www-authenticate:basic realm= ' login information ');
Echo ' Displays the information! ';
403 No Access
Header (' http/1.1 403 Forbidden ');
404 error
Header (' http/1.1 404 Not Found ');
500 Server Error
Header (' http/1.1 Internal Server Error ');
REDIRECT the specified address after 3 seconds (that is, refresh to a new page and
Header (' content-transfer-encoding:binary ');
ReadFile (' example.zip ');//Read file to Client
Disable Page Caching
Header (' Cache-control:no-cache, No-store, max-age=0, Must-revalidate ');
Header (' Expires:mon, Jul 1997 05:00:00 GMT ');
Header (' Pragma:no-cache ');
Set Page header information
Header (' content-type:text/html; charset=iso-8859-1 ');
Header (' content-type:text/html; Charset=utf-8 ');
Header (' Content-type:text/plain ');
Header (' Content-type:image/jpeg ');
Header (' Content-type:application/zip ');
Header (' content-type:application/pdf ');
Header (' Content-type:audio/mpeg ');
Header (' Content-type:application/x-shockwave-flash ');
//.... As for the value of Content-type, you can check the document library, which is very rich
?>
http://www.bkjia.com/PHPjc/824977.html www.bkjia.com true http://www.bkjia.com/PHPjc/824977.html techarticle The header () function sends the original HTTP header to the client. Copy the code as follows: Php//200 normal status header (' http/1.1 OK '); 301 permanent redirects, remember to add in the back ...