Skip to content

[Function] 현재 Url 리턴

MintState October 29, 2008 at 5:47 PM Views 14639

[Function] 현재 URL 리턴

function getURL(){ 
	$server=getenv("SERVER_NAME"); 
	$file=getenv("SCRIPT_NAME"); 
	$query=getenv("QUERY_STRING"); 
	$url="http://$server$file"; 
	if($query) $url.="?$query"; 
	return $url;
} 

echo getURL(); 
echo $url;
Share X Facebook LINE QR code

0 comments

Be the first to comment.