/install folder and follow installation procedure"; die(); } // if define('UPLOAD_URL', ROOT_URL . '/public/files'); // --------------------------------------------------- // Init... // --------------------------------------------------- include_once 'environment/environment.php'; // Connect to database... try { DB::connect(DB_ADAPTER, array( 'host' => DB_HOST, 'user' => DB_USER, 'pass' => DB_PASS, 'name' => DB_NAME, 'persist' => DB_PERSIST )); // connect if(defined('DB_CHARSET') && trim(DB_CHARSET)) DB::execute("SET NAMES " . DB::escape(DB_CHARSET)); } catch(Exception $e) { if(Env::isDebugging()) { Env::dumpError($e); } else { die('Failed to connect to database. Reason: ' . $e->getMessage()); } // if } // try // Init application if(Env::isDebugging()) benchmark_timer_set_marker('Init application'); // Routes (disabled on 2006-05-17) // //include_once ROOT . '/config/routes.php'; // // Match route... //try { // Routes::instance()->match(array_var($_GET, 'req')); //} catch(Exception $e) { // if(Env::isDebugging()) { // Env::dumpError($e); // } else { // die('There is no route that matches your request. Reason: ' . $e->getMessage()); // } // if //} // try // We need to call application.php after the routing is executed because // some of the application classes may need CONTROLLER, ACTION or $_GET // data collected by the matched route include_once 'application.php'; // Set handle request timer... if(Env::isDebugging()) benchmark_timer_set_marker('Handle request'); // Get controller and action and execute... try { Env::executeAction(request_controller(), request_action()); } catch(Exception $e) { if(Env::isDebugging()) { Env::dumpError($e); } else { die('Failed to execute your request. Reason: ' . $e->getMessage()); } // if } // try ?>