(使用LAMP配置,PHP)
换句话说…我想知道条目是手动输入到地址栏中,还是使用了链接/书签.
解决方法:
您可以检查$_SERVER [‘HTTP_REFERER’]变量,该变量将包含此人所导航的URL.我不确定如果他们选择书签或手动输入URL会发生什么,尽管我怀疑此变量为空.
但是,正如the manual中所述:
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.