如何允许从另一个页面访问一个页面 我有一个名为 info.php 的页面,但我不希望任何人从浏览器进入,如果他们尝试该页面将否定访问,我希望他们从另一个页面进入访问以激活info.php 的入口
check out $_SERVER['HTTP_REFERER'] when entering your "private page"...
It is the page that called the current page. Just check it on your "private" page, and if the referer is really the page you allow user access from, then display it. if not just display an error message...
http://php.net/manual/fr/reserved.variables.server.php
Hope it helps!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.