php获取当前网址
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://": "http://";//协议头
$siteurl = $protocol . $_SERVER['HTTP_HOST'];//站点网址
$siteurl = $protocol . $_SERVER['HTTP_HOST'];//站点网址
如果要获取当前完整的url地址
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://": "http://";//协议头
$url = $protocol . $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'];//完整的url地址
$url = $protocol . $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'];//完整的url地址