} else {
        $_runtime['ScriptName'] = $cfg['facula']['PrimaryScript'];
    }
    $_runtime['ScriptFull'] = $site['APIFastCGI'] ? $_SERVER['QUERY_STRING'] : $_SERVER['PATH_INFO'];
    // Get the self url for web page
    if ($site['general']['SiteUrlRewrite'] && $site['HtaccessFileExisted']) {
        $_runtime['BaseURL'] = $_runtime['SelfRoot'] . $_runtime['ScriptFull'];
        $_runtime['RootURL'] = $_runtime['SelfRoot'];
        $_runtime['ActualBaseURL'] = $_runtime['ScriptRoot'] . $_runtime['ScriptFull'];
        $_runtime['ActualRootURL'] = $_runtime['ScriptRoot'];
    } else {
        $_runtime['BaseURL'] = $_runtime['SelfRoot'] . '/' . $_runtime['ScriptName'] . $_runtime['ScriptFull'];
        $_runtime['RootURL'] = $_runtime['SelfRoot'] . '/' . $_runtime['ScriptName'];
        $_runtime['ActualBaseURL'] = $_runtime['ScriptRoot'] . '/' . $_runtime['ScriptName'] . $_runtime['ScriptFull'];
        $_runtime['ActualRootURL'] = $_runtime['ScriptRoot'] . '/' . $_runtime['ScriptName'];
    }
    $_URLPARAM = url_parameters($_runtime['ScriptFull']);
}
// Init Template Engine
$ui = new ui($cfg['template'], $site['general'], $_URLPARAM, $_runtime, $oops, $sec, $ses);
unset($cfg['template'], $cfg['cache'], $cfg['db']);
// Save all localsetting to sec class
$sec->setLocalSetValue($cfg);
unset($cfg, $site);
// Set autoload. Great thanks to tabris17.cn@hotmail
function __autoload($classname)
{
    global $sec;
    return $sec->loadClass($classname);
}
$_runtime['Timer']['InitFinished'] = $_runtime['Timer']['UserCodeStart'] = getMicrotime();