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