php header
PHPheader()函数用法/***Function:PHPheader()examples(PHP)
**Desc:Someexamplesonhowtousetheheader()functionofPHPYoufindadetailedtutorialatexpertsrt.com(English)oratffm.junetz.de(German).Theseisalsoagoodhelpaboutcachingatweb-caching.com.
**Example:seebelow.Tip:Youcanusethesesitestocheckyourheaders:web-sniffer.net,delorie.comorwww.forret.com.
**Author:JonasJohn
*/
//fix404pages:
header('HTTP/1.1200OK');
//set404header:
header('HTTP/1.1404NotFound');
//setMovedPermanentlyheader(goodforredrictions)
//usewithlocationheader
header('HTTP/1.1301MovedPermanently');
//redirecttoanewlocation:
header('Location:http://www.example.org/');
//redrictwithdelay:
header('Refresh:10;url=http://www.example.org/');
print'Youwillberedirectedin10seconds';
//youcouldalsousetheHTMLsyntax://
页:
[1]