【php】获取当前url

function GetUrl(){
        // 获取当前url
	$currentUrl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
	$lastUrl = $_SERVER['HTTP_HTTP_REFERER'];
	$urlString = $lastUrl.$currentUrl; 
	return $urlString;
}

你可能感兴趣的:(【php】获取当前url)