echo
‘SERVER_NAME:‘
.
$_SERVER
[
‘SERVER_NAME‘
];
//获取当前域名(不含端口号)
echo
‘<p>‘
;
echo
‘HTTP_HOST:‘
.
$_SERVER
[
‘HTTP_HOST‘
];
//获取当前域名 (含端口号)
echo
‘<p>‘
;
echo
‘REQUEST_URI:‘
.
$_SERVER
[
‘REQUEST_URI‘
];
//获取当前域名的后缀
标签:获取 php plain ons comment comm div 端口 contain
echo
‘SERVER_NAME:‘
.
$_SERVER
[
‘SERVER_NAME‘
];
//获取当前域名(不含端口号)
echo
‘<p>‘
;
echo
‘HTTP_HOST:‘
.
$_SERVER
[
‘HTTP_HOST‘
];
//获取当前域名 (含端口号)
echo
‘<p>‘
;
echo
‘REQUEST_URI:‘
.
$_SERVER
[
‘REQUEST_URI‘
];
//获取当前域名的后缀
标签:获取 php plain ons comment comm div 端口 contain
原文地址:https://www.cnblogs.com/nyfz/p/8376095.html