//PHP获取当前url function getCurrentUrl() { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $url = $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; return $url; }
未经允许不得转载:吾爱主机之家 » PHP获取当前url的函数