env.php
640 Bytes
<?php
define('APP_DIR', dirname(dirname(__FILE__)));
define('ROOT_DIR', dirname(dirname(APP_DIR)));
// 定义应用常量
include APP_DIR.'/config/Defines.class.php';
Config_Defines::setVaribles('test');
switch(RELEASE_ENV) //后台脚本运行,数据库单台运行
{
case 'local':
define('RELEASE_DB_ENV','local');
break;
case 'test':
define('RELEASE_DB_ENV','test');
break;
case 'release':
define('RELEASE_DB_ENV','releasebg');
break;
}
// 引入框架文件
require ROOT_DIR.'/util/framework/Y.class.php';
$config = include APP_DIR.'/config/Boot.inc.php';
// 执行框架分派
$y = Framework_Y::instance($config);