|
Header ('http/1.1 200 OK '); // OK for normal access
Header ('http/1.1 404 Not Found '); // notifies the browser that the page does Not exist
Header ('http/1.1 301 Moved Permanently '); // Set the address to be Permanently redirected to 301
Header ('Location: http://www.ithhc.cn/'); // jump to a new address
Header ('refresh: 10; url = http://www.ithhc.cn/'); // latency redirection is the jump every few seconds
Header ('x-Powered-By: PHP/6.0.0 '); // modify the X-Powered-By information
Header ('content-language: en'); // document language
Header ('content-Length: 1234 '); // you can specify the Content Length.
Header ('last-Modified :'. gmdate ('d, d m y h: I: S', $ time ). 'gmt'); // tell the browser the last modification time
Header ('http/1.1 304 Not modified'); // tells the browser that the document content has Not changed
### Content type ###
Header ('content-Type: text/html; charset = utf-8 '); // webpage encoding
Header ('content-Type: text/plain '); // plain text format
Header ('content-Type: image/jpeg '); // JPG, JPEG
Header ('content-Type: application/zip'); // zip file
Header ('content-Type: application/pdf '); // pdf file
Header ('content-Type: audio/mpeg '); // audio File
Header ('content-type: text/css '); // css file
Header ('content-type: text/javascript '); // js file
Header ('content-type: application/json'); // json
Header ('content-type: application/pdf '); // pdf
Header ('content-type: text/XML'); // xml
Header ('content-Type: application/x-shockw ** e-Flash'); // flash animation
######
### Declare a downloaded file ###
Header ('content-Type: application/octet-stream ');
Header ('content-Disposition: attachment; filename = "ITblog.zip "');
Header ('content-Transfer-Encoding: binary ');
Readfile('test.zip ');
######
### Disable caching for the current document ###
Header ('cache-Control: no-Cache, no-store, max-age = 0, must-revalidate ');
Header ('expires: Mon, 26 Jul 1997 05:00:00 GMT ');
######
### Display a login dialog box to be verified ###
Header ('http/1.1 401 unauthorized ');
Header ('www-Authenticate: Basic realm = "Top Secret "');
######
### Declare an xls file to be downloaded ###
Header ('content-Disposition: attachment; filenameithithhc.xlsx ');
Header ('content-Type: application/vnd. openxmlformats-officedocument.spreadsheetml.sheet ');
Header ('content-Length: '. filesize ('./test.xls '));
Header ('content-Transfer-Encoding: binary ');
Header ('cache-Control: must-revalidate ');
Header ('pragma: public ');
Readfile ('./test.xls ');
######
?>
|