我如何使用 PHP 或 Javascript 来检查用户的上一页是否是我网站上的某个页面,如果是,则显示警告框?
1 回答
郎朗坤
TA贡献1921条经验 获得超9个赞
如果一个人真的想要,这可以被规避。
//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'];
- 1 回答
- 0 关注
- 157 浏览
添加回答
举报
0/150
提交
取消