Php code for getting address bar information _ PHP Tutorial

Source: Internet
Author: User
Php code for obtaining address bar information. Copy the code as follows :? Php obtains the domain name or host address echo $ _ SERVER [HTTP_HOST]. br; obtains the webpage address echo $ _ SERVER [PHP_SELF]. br; obtains the url parameter echo $ _ SERV The code is as follows:


// Obtain the domain name or host address
Echo $ _ SERVER ['http _ host']."
";
// Obtain the webpage address
Echo $ _ SERVER ['php _ SELF ']."
";
// Obtain URL parameters
Echo $ _ SERVER ["QUERY_STRING"]."
";
// Detailed address of the source webpage
Echo $ _ SERVER ['http _ referer']."
";
?>

The http://www.bkjia.com/PHPjc/319669.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319669.htmlTechArticle code is as follows :? Php // Obtain the domain name or HOST address echo $ _ SERVER ['http _ host']. "br"; // Obtain the webpage address echo $ _ SERVER ['php _ SELF ']. "br"; // Obtain the url parameter echo $ _ SERV...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.