示例#1
0
function osc_getAbsoluteWebURL()
{
    $protocol = 'http';
    if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' || isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1)) {
        $protocol = 'https';
    }
    return $protocol . '://' . getServerParam('HTTP_HOST') . osc_getRelativeWebURL();
}
示例#2
0
文件: readme.php 项目: semul/Osclass
function osc_getAbsoluteWebURL()
{
    $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
    return $protocol . '://' . $_SERVER['HTTP_HOST'] . osc_getRelativeWebURL();
}