[英]Equivalent of C# HttpRequest in PHP
I'm trying to find the equivalent of System.Web.HttpRequest in PHP for the current page, as I would like to access the current variables. 我想在PHP中找到与当前页面等效的System.Web.HttpRequest,因为我想访问当前变量。 Most, I realise, you can get from $_SERVER, but there seems to be some missing from there (eg Referer and cookie).
我知道,大多数都可以从$ _SERVER那里获得,但是那里似乎缺少一些东西(例如Referer和cookie)。
If anyone can help it would be much appreciated. 如果有人可以帮助,将不胜感激。
Referer is found in the $_SERVER
as the key HTTP_REFERER
. 在
$_SERVER
找到$_SERVER
作为关键字HTTP_REFERER
。
Cookies can be accessed through $_COOKIE
and set_cookie()
. 可以通过
$_COOKIE
和set_cookie()
访问Cookies。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.