Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试限制页面访问,以便用户必须通过单击 3 个页面中的 1 个上的按钮进入相关页面。
因此,需要明确的是,只有当用户单击页面 1、2 或 3 中的按钮时,才能访问页面 x。
我尝试过使用issetif/else块,但似乎无法通过这种方式限制页面访问取得任何进展。如果有人有任何建议,我将不胜感激!
isset
else
使用会话...
例如
session_start(); $_SESSION=array();
在每个页面中向数组添加一个值
$_SESSION['page1']="viewed"; $_SESSION['page2']="viewed";
在您的安全页面中检查$_SESSION数组的元素
$_SESSION
单击所述按钮时设置一个cookie,并在访问该页面时检查该cookie。