标签:http io on cti ef amp tt br php
//php获取当前访问的完整url地址
function get_current_url(){
$current_url=‘http://‘;
if(isset($_SERVER[‘HTTPS‘])&&$_SERVER[‘HTTPS‘]==‘on‘){
$current_url=‘https://‘;
}
if($_SERVER[‘SERVER_PORT‘]!=‘80‘){
$current_url.=$_SERVER[‘SERVER_NAME‘].‘:‘.$_SERVER[‘SERVER_PORT‘].$_SERVER[‘REQUEST_URI‘];
}else{
$current_url.=$_SERVER[‘SERVER_NAME‘].$_SERVER[‘REQUEST_URI‘];
}
return $current_url;
}
标签:http io on cti ef amp tt br php
原文地址:http://www.cnblogs.com/jdhu/p/4168950.html