// define('CONFIG_FILE', 'maple.ini'); if (!defined('PATH_SEPARATOR')) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { define('PATH_SEPARATOR', ';'); } else { define('PATH_SEPARATOR', ':'); } } ini_set('include_path', BASE_DIR . '/libs/pear' . PATH_SEPARATOR . ini_get('include_path')); ini_set('include_path', BASE_DIR . '/components' . PATH_SEPARATOR . ini_get('include_path')); ini_set('include_path', BASE_DIR . '/htdocs_app' . PATH_SEPARATOR . ini_get('include_path')); // //基本となる定数の読み込み // Teeple_GlobalConfig::loadConstantsFromFile(dirname(__FILE__) . '/constants.ini'); mb_internal_encoding(INTERNAL_CODE); // // 基本クラスの読み込み // //ini_set('include_path', LOG4PHP_DIR . PATH_SEPARATOR . ini_get('include_path')); include_once LOG4PHP_DIR . '/LoggerManager.php'; // // autoload // ini_set('unserialize_callback_func', 'loadComponentClass'); function loadComponentClass($name) { include_once 'teeple/Util.php'; Teeple_Util::includeClassFile($name); }
/** * ファイルから設定を読み込み、 * 定数としてのエクスポートまでを行うstaticメソッド * * @static * @access public * @return boolean */ function loadConstantsFromFile($filename) { $config = new Teeple_GlobalConfig(true); if (!$config->loadFromFile($filename)) { return false; } $config->exportConstants(); }