HTTP_REFERER 获取用户来路实例
来源:程序员人生 发布时间:2014-01-22 03:44:09 阅读次数:2209次
http_referer 获取用户来路实例,这是个php自来全局变量,所以我们不多介绍了,直接看实例:
- <?php
- if (isset($_server['http_referer'])) {
- print "the page you were on previously was {$_server['http_referer']}<br />";
- } else {
- print "you didn't click any links to get here<br />";
- }
- ?>
-
- <a href="refer.php">click me!</a>
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠