/**
* 获取网站地址
* @return string 返回网站地址
*/
function getWebUrl() {
$http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
$PHP_SELF=$_SERVER['SCRIPT_NAME'];
$url = $http_type . $_SERVER['SERVER_NAME'] . substr($PHP_SELF,0,strrpos($PHP_SELF,'/')+1);
return $url;
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询