Esempio n. 1
0
    }
} else {
    Debug::addmsg('<span style="color:red;">[未使用Memcache]</span>');
}
if (IS_SESSION_TO_MEMCACHE && MEMCACHE) {
    SessionToMem::start(MyMemcache::getMemcache());
    Debug::addmsg('开启Session==>Memcache');
} else {
    session_start();
}
Debug::addmsg('SessionID: ' . session_id());
if (empty($_SESSION['configMtime'])) {
    $_SESSION['configMtime'] = filemtime('./Public/Config.inc.php');
}
if (filemtime('./Public/Config.inc.php') > $_SESSION['configMtime']) {
    Struct::init();
    //当修改配置文件,同样执行一次框架结构类
    //自动根据数据库驱动切换继承关系
    $_SESSION['configMtime'] = filemtime('./Public/Config.inc.php');
    $String = file_get_contents(RELUC_DIR . 'Kernel/Model.class.php');
    $replaceMent = 'extends Base' . ucfirst(strtolower(DB_DRIVER)) . "\n";
    $String = preg_replace('/extends\\s+\\w+\\s+/', $replaceMent, $String);
    file_put_contents(RELUC_DIR . 'Kernel/Model.class.php', $String);
}
$_GET['m'] = !isset($_GET['m']) ? 'index' : strtolower($_GET['m']);
$_GET['a'] = !isset($_GET['a']) ? 'index' : strtolower($_GET['a']);
if (array_key_exists('PATH_INFO', $_SERVER)) {
    $pathinfo = trim($_SERVER['PATH_INFO'], '/');
    $PATHINFO = explode('/', $pathinfo);
    $_GET['m'] = empty($PATHINFO[0]) ? 'index' : strtolower($PATHINFO[0]);
    $_GET['a'] = empty($PATHINFO[1]) ? 'index' : $PATHINFO[1];