The PHP function header issues HTTP header information. Send the 404 status code header (HTTP1.1404NotFound) to the browser; or the header (HTTP1.1404); permanently redirect the header (Location: weizhifeng.net); the default value is 301.
// Send the 404 status code to the browser
Header ("HTTP/1.1 404 Not Found ");
Or
Header ("HTTP/1.1 404 ″);
// Permanent redirect
Header ("Location: http://weizhifeng.net/"); // The default value is 301.
// Temporary redirection
Header ("HTTP/1.1 302 Found ");
Header ("Location: http://weizhifeng.net /");
// Download an object
Header ("Content-type: text/plain '); // you can replace it with the MIME type you need.
Header ('content-Disposition: attachment; filename=%weizhifeng.txt "');
Readfile('weizhifeng.txt ');
For other header information, refer to HTTP/1.1 specification
If the output already exists before the header, use the ob_start () function.
The http://www.bkjia.com/PHPjc/445995.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445995.htmlTechArticle// sends a 404 status code header (HTTP/1.1 404 Not Found); or header (HTTP/1.1 404); // permanent redirect header (Location: http://weizhifeng.net /); // The default value is 301 jump //...