Home  >  Article  >  Backend Development  >  PHP code to obtain address bar information_PHP tutorial

PHP code to obtain address bar information_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:48:56718browse

Copy code The code is as follows:

//Get the domain name or host address
echo $_SERVER['HTTP_HOST']."
";
//Get the web page address
echo $_SERVER['PHP_SELF']."
";
//Get the URL parameters
echo $_SERVER["QUERY_STRING"]."
";
//The detailed address of the source webpage
echo $_SERVER['HTTP_REFERER']."
";
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319669.htmlTechArticleCopy the code as follows: ?php //Get the domain name or host address echo $_SERVER['HTTP_HOST']." br"; //Get the web address echo $_SERVER['PHP_SELF']."br"; //Get the URL parameters echo $_SERV...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn