【发布时间】:2009-06-23 22:14:44
【问题描述】:
我刚刚写了一个PHP登录脚本,我想要完成的是当用户点击注销链接时,他们注销后,无论点击浏览器的后退按钮,他们都无法访问该页面.
这里是注销功能:
//Start the Session
session_start();
session_destroy();
header("location:login.php");
exit();
我确实在所有页面上都放置了以下代码,但这似乎不起作用:
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache");
//Start the Session
session_start();
有什么建议吗?
【问题讨论】:
标签: php