php获取地址栏信息的代码_PHP
程序员文章站
2022-06-12 13:49:48
...
复制代码 代码如下:
//获取域名或主机地址
echo $_SERVER['HTTP_HOST']."
";
//获取网页地址
echo $_SERVER['PHP_SELF']."
";
//获取网址参数
echo $_SERVER["QUERY_STRING"]."
";
//来源网页的详细地址
echo $_SERVER['HTTP_REFERER']."
";
?>
//获取域名或主机地址
echo $_SERVER['HTTP_HOST']."
";
//获取网页地址
echo $_SERVER['PHP_SELF']."
";
//获取网址参数
echo $_SERVER["QUERY_STRING"]."
";
//来源网页的详细地址
echo $_SERVER['HTTP_REFERER']."
";
?>