Reading URL in php
This question already has an answer here:
The thing you want is Subdomain of your url. Use this
$subdomain = array_shift(explode(".",$_SERVER['HTTP_HOST']));
$domain = $_SERVER['HTTP_HOST'];
$path = $_SERVER['SCRIPT_NAME'];
$queryString = $_SERVER['QUERY_STRING'];
$url = "http://" . $domain . $path . "?" . $queryString;
echo "The current URL is: " . $url . "";
visit :http://www.2basetechnologies.com/
链接地址: http://www.djcxy.com/p/42286.html
下一篇: 在php中读取URL