Php Expires Header: Difference between revisions

From EggeWiki
m (Created page with 'Add an expires header to cause the page to expire in 24 hours. <geshi lang="php"> $offset = 60 * 60 * 24; $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . "…')
 
mNo edit summary
 
Line 7: Line 7:
</geshi>
</geshi>


[[Category:Php]]
[[Category:Php|Expires header]]

Latest revision as of 05:46, 19 July 2009

Add an expires header to cause the page to expire in 24 hours.

<geshi lang="php"> $offset = 60 * 60 * 24; $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; header($ExpStr); </geshi>