* @author * Alexandre Perrin <*****@*****.**> */ // define a constant for local path define('PROJECTDIR', dirname(__FILE__)); define('APPDIR', PROJECTDIR . '/app'); define('WEBDIR', PROJECTDIR . '/web'); // self-explanatory require_once PROJECTDIR . '/compat/all.inc.php'; // load Composer stuff require_once PROJECTDIR . '/vendor/autoload.php'; // initialize no2 framework. require_once PROJECTDIR . '/no2/no2.inc.php'; // get the config stuff require_once APPDIR . '/config.class.php'; AppConfig::parse(PROJECTDIR . '/config/config.yml', array('{{APPDIR}}' => APPDIR, '{{PROJECTDIR}}' => PROJECTDIR, '{{WEBDIR}}' => WEBDIR)); // load the application's models. require_once APPDIR . '/models/user.class.php'; // load the application's helpers. require_once APPDIR . '/help.inc.php'; // set the timezone date_default_timezone_set(AppConfig::get('l10n.default_timezone')); // set the locale setlocale(LC_ALL, AppConfig::get('l10n.default_locale')); // start the logger if (!No2_Logger::setup(AppConfig::get('logger'))) { error_log('unable to setup Logger'); } // connect to the database. No2_SQLQuery::setup(AppConfig::get('database')); // try our best to hide the fact that we still use PHP in the 21th century.