$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $config['SITE_PATH'])); if (strpos($config['SUBFOLDER'], '/') !== 0) { $config['SUBFOLDER'] = '/' . $config['SUBFOLDER']; } $config['APP_URL'] = 'http://' . $_SERVER['HTTP_HOST'] . $config['SUBFOLDER']; $config['DEBUG_ENABLED'] = FALSE; $config['ERROR_404_ROUTE'] = '/404.htm'; $config['AUTOROUTE'] = true; require_once $config['BASE_PATH'] . 'Doo.php'; require_once $config['BASE_PATH'] . 'app/DooConfig.php'; include PROJECT_ROOT . 'config/route.php'; if (file_exists(PROJECT_ROOT . 'config/db.php')) { require_once PROJECT_ROOT . 'config/db.php'; } else { require_once LUA_ROOT . ADMIN_ROOT . '/config/db.php'; } if (file_exists(PROJECT_ROOT . 'config/acl.php')) { require_once PROJECT_ROOT . 'config/acl.php'; } else { require_once LUA_ROOT . ADMIN_ROOT . '/config/acl.php'; } Doo::acl()->rules = $acl; Doo::acl()->defaultFailedRoute = '/' . SYSNAME . '/401.htm'; Doo::conf()->set($config); require_once $config['BASE_PATH'] . 'diagnostic/debug.php'; Doo::db()->setDb($dbconfig, $config['APP_MODE']); Doo::db()->sql_tracking = true; Doo::app()->route = $route; Doo::loadClass('Lua', false, ADMIN_ROOT); ob_start(); Doo::app()->run();
/** * Returns the Acl singleton, shorthand to Doo::acl() * @return DooAcl */ public function acl() { return Doo::acl(); }
<?php include './protected/config/common.conf.php'; include './protected/config/routes.conf.php'; include './protected/config/db.conf.php'; include './protected/config/acl.conf.php'; #Just include this for production mode //include $config['BASE_PATH'].'deployment/deploy.php'; include $config['BASE_PATH'] . 'Doo.php'; include $config['BASE_PATH'] . 'app/DooConfig.php'; Doo::conf()->set($config); include $config['BASE_PATH'] . 'diagnostic/debug.php'; Doo::acl()->rules = $acl; Doo::acl()->defaultFailedRoute = '/error'; Doo::db()->setDb($dbconfig, $config['APP_MODE']); //Doo::db()->sql_tracking = true; Doo::app()->route = $route; Doo::app()->run();