Beginner Hacker: PHP Get Server path and visitor Information _php Tutorial

Source: Internet
Author: User
echo "PHP gets the current URL
";
$url = "http://". $_server [' http_host '].$_server[' php_self '];
echo $url;
?>


The following code is: PHP Gets the Web site root directory

$PHP _self=$_server[' php_self '];
$url = ' http://' $_server[' Http_host '].substr ($PHP _self,0,strrpos ($PHP _self, '/') +1);
echo $url;
?>
-


PHP Get Visitor Information


Print_r ($_server[' cert_serialnumber ');
Print_r ($_server);
?>

http://www.bkjia.com/PHPjc/777569.html www.bkjia.com true http://www.bkjia.com/PHPjc/777569.html techarticle php echo php gets the current urlbr/; $url = Http://.$_server [http_host].$_server[php_self]; echo $url; br/The following code is: PHP get web site root directory br/ ? php $PHP _self=$_server[php_s ...

  • 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.