예제 #1
0
파일: config.php 프로젝트: jechiy/xiu-cms
function reset_config()
{
    global $config, $re_config;
    $root = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
    if ($root != '/' && $root != '') {
        $root .= '/';
    }
    $re_config['S_ROOT'] = $root;
    include 'include/browser.class.php';
    $obj = new browser();
    $re_config['S_BROWSER'] = $obj->check_browser();
    foreach ($re_config as $key => $value) {
        $config[$key] = $value;
    }
    foreach ($config as $key => $value) {
        define($key, $value);
    }
}