コード例 #1
0
ファイル: gitblog.php プロジェクト: rsms/gitblog
    }
    gb::$site_dir = realpath($s);
}
# gb::$site_path -- must end in a slash ("/").
if (isset($gb_site_path)) {
    gb::$site_path = $gb_site_path;
    unset($gb_site_path);
} else {
    gb::$site_path = $u === '/' ? $u : $u . '/';
}
# gb::$site_url -- URL to the base of the site. Must end in a slash ("/").
if (isset($gb_site_url)) {
    gb::$site_url = $gb_site_url;
    unset($gb_site_url);
} else {
    gb::$site_url = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] !== '80' && $_SERVER['SERVER_PORT'] !== '443' ? ':' . $_SERVER['SERVER_PORT'] : '') . gb::$site_path;
}
# only set the following when called externally
if (!gb::$is_internal_call) {
    # gb::$theme_dir
    if (isset($gb_theme_dir)) {
        gb::$theme_dir = $gb_theme_dir;
        unset($gb_theme_dir);
    } else {
        $bt = debug_backtrace();
        gb::$theme_dir = dirname($bt[0]['file']);
    }
    # gb::$theme_url
    if (isset($gb_theme_url)) {
        gb::$theme_url = $gb_theme_url;
        unset($gb_theme_url);