示例#1
0
    header('HTTP/1.1 404 Not Found');
    exit;
}
/** LOAD : Basic Components
 * --------------------
 * Loads singleton base class and autoloader.
 */
/** LOAD : Configuration and Debug module (if necessary)
 * --------------------
 */
global $context, $uri;
//global $config, $context, $uri;
/// Loading configuration
$context = Model_Context::getInstance();
// automatic initialization via first instanciation
$config = Model_Config::getInstance();
$uri = Model_URIHandler::getInstance();
/// Setting basic paths
$predefinedPaths = array('__TEXTCUBE_CONFIG_FILE__' => ROOT . '/config.php', '__TEXTCUBE_CACHE_DIR__' => ROOT . '/user/cache', '__TEXTCUBE_ATTACH_DIR__' => ROOT . '/user/attach');
foreach ($predefinedPaths as $symbol => $location) {
    if (!defined($symbol)) {
        define($symbol, $location);
    }
}
/// Loading debug module
if ($context->getProperty('service.debugmode') == true) {
    require_once ROOT . "/library/debug.php";
    if (!is_null($context->getProperty('database.dbms'))) {
        require_once ROOT . "/framework/data/" . $context->getProperty('database.dbms') . "/Debug.php";
    } else {
        require_once ROOT . "/framework/data/MySQL/Debug.php";