コード例 #1
0
ファイル: load.php プロジェクト: apeschar/php-fw
// UTF8 encoding
header('Content-Type: text/html; charset=UTF-8');
// include path
require_once FW_DIR . '/lib/classes/FWIncludePath.class.php';
FWIncludePath::clean();
FWIncludePath::prepend(FW_DIR . '/lib/classes');
FWIncludePath::prepend(APP_DIR . '/lib');
FWIncludePath::prepend(APP_DIR . '/lib/forms');
require_once 'exceptions.php';
// error handler
require_once 'FWErrorHandler.class.php';
FWErrorHandler::resetAssertOptions();
FWErrorHandler::enable();
if (DEVELOPMENT) {
    FWErrorHandler::setDebug(true);
}
// autoloader
require_once 'FWAutoloader.class.php';
FWAutoloader::register();
// i18n
if (defined('APP_LOCALE')) {
    FWI18N::setLocale(APP_LOCALE);
}
// load propel
if (APP_ENABLE_PROPEL) {
    FWIncludePath::prepend(FW_DIR . '/lib/vendor/propel/runtime/classes');
    FWIncludePath::prepend(APP_DIR . '/model/build/classes/propel');
    FWIncludePath::prepend(APP_DIR . '/model/build/classes');
    require 'propel/Propel.php';
    Propel::init(APP_DIR . '/model/build/conf/propel-conf.php');
}