我如何使用 PHP 或 Javascript 来检查用户的上一页是否是我网站上的某个页面,如果是,则显示警告框?
1 回答

大话西游666
TA贡献1817条经验 获得超14个赞
如果一个人真的想要,这可以被规避。
//on the page for the alert
session_start();
if($_SESSION['lastPage']=='??'){
echo 'alert';
}
//on the page you want to detect if the user came from
session_start();
$_SESSION['lastPage']=$_SERVER['REQUEST_URI'];
添加回答
举报
0/150
提交
取消