Common PHPheader () function methods. Define the encoding atomcssjavascriptjavasimagejsonpdfrsstext (Plain) XMLok to set a 404 header: Set the address to be permanently redirected to a new address // define the encoding
// Atom
// CSS
// Javascript
// JPEG Image
// JSON
// PDF
// RSS
// Text (Plain)
// XML
// OK
// Set a 404 header:
// Set the address to be permanently redirected
// Go to a new address
// File delay redirection:
Print 'You will be redirected in 10 seconds ';
// Of course, you can also use html syntax to implement
// Header ('content-Transfer-Encoding: binary ');
// Load the file to send:
Readfile('example.zip ');
// Disable caching for the current document
Header ('expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
Header ('pragma: no-cache ');
// Set the content type:
Header ('content-Type: text/html; charset = utf-8 ');
Header ('content-Type: text/plain '); // plain text format
Header ('content-Type: image/jpeg '); // JPG ***
Header ('content-Type: application/zip'); // zip file
Header ('content-Type: application/pdf '); // pdf file
Header ('content-Type: audio/mpeg '); // audio File
Header ('content-Type: application/x-shockw ** e-Flash'); // flash animation
// Display the login dialog box
Header ('www-Authenticate: Basic realm = "Top Secret "');
Print 'text that will be displayed if the user hits cancel or ';
Print 'enters wrong login data ';
Examples // Atom // CSS // Javascript // JPEG Image // JSON // PDF // RSS // Text (Plain) // XML // OK // set a 404 header: // Set the address to be permanently redirected // switch to a new address...