PHP获取当前页面完整url地址,包括参数的函数

//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;
}

上一篇:NFS启动时报错Linux NFS:could not open connection for tcp6


下一篇:JDK源码那些事儿之浅析Thread上篇