In the PHP language, the header () function is useful, especially when using Ajax.
Here are some detailed explanations of the header.
Override X-powered-by:php:header (' x-powered-by:php/4.4.0 '); Header (' x-powered-by:brain/0.6b '); Content language (en = 中文版) header (' Content-language:en '); Last modified (good for caching) $time = time () –60; or Filemtime ($FN), etc header (' last-modified: '. Gmdate (' d, D M Y h:i:s ', $time). ' GMT '); Header for telling the browser, the content/do not get changed headers (' http/1.1 304 not Modified '); Set content Length (good for Caching): header (' content-length:1234 '); Headers for an download:header (' Content-type:application/octet-stream '); Header (' content-disposition:attachment; filename= ' Example.zip '); Header (' content-transfer-encoding:binary '); Load the file to Send:readfile (' example.zip '); Disable caching of the current Document:header (' Cache-control:no-cache, No-store, max-age=0, Must-revalidate '); Header (' Expires:mon, Jul 1997 05:00:00 GMT '); Date in the Pastheader (' Pragma:no-cache '); Set content Type:header (' Content-type: text/html; Charset=iso-8859-1 '); Header (' content-type:text/html; Charset=utf-8 '); Header (' Content-type:text/plain '); Plain text file header (' Content-type:image/jpeg '); JPG Picture header (' Content-type:application/zip '); ZIP file header (' Content-type:application/pdf '); PDF file header (' Content-type:audio/mpeg '); Audio MPEG (MP3,...) file header (' Content-type:application/x-shockwave-flash '); Flash animation//Show Sign In box header (' http/1.1 401 Unauthorized '); Header (' Www-authenticate:basic realm= ' Top Secret '); print ' Text that would be displayed if the user hits cancel or '; print ' enters wrong login data ';?>
http://www.bkjia.com/PHPjc/444562.html www.bkjia.com true http://www.bkjia.com/PHPjc/444562.html techarticle In the php language, the header () function is useful, especially when using Ajax. Here is some detailed explanation of the header. PhP2/** 3 * PHP Header Function Usage Example * collation: Www.jbxue ...