Loading

PHP设置页面过期

今天碰到了设置PHP页面过期的问题,之前有的页面后退过期,有的不过期,删掉页面中的关于过期的HTML代码,用以下代码就可以统一控制IE下提交表单页面的过期情况

PHP设置页面过期
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

PHP设置页面不过期

session_cache_limiter('private,must-revalidate');

posted @ 2011-01-12 16:55  伊莫的森林  阅读(278)  评论(0编辑  收藏  举报