添加应用状态配置文件支持

This commit is contained in:
thinkphp
2013-03-13 17:04:12 +08:00
parent e43e62197b
commit 4b739dabd7
2 changed files with 2 additions and 3 deletions

View File

@@ -220,8 +220,8 @@ class App {
if(is_file(MODULE_PATH.'config'.EXT)) {
$config = Config::set(include MODULE_PATH.'config'.EXT);
}
if(Config::get('app_debug')) {
// 读取调试模式的应用状态
if(Config::has('app_status')) {
// 读取应用状态配置文件
$status = Config::get('app_status');
// 加载对应的项目配置文件
if(is_file(MODULE_PATH.$status.EXT))

View File

@@ -27,7 +27,6 @@ defined('CACHE_PATH') or define('CACHE_PATH', RUNTIME_PATH.'Temp/');
defined('VENDOR_PATH') or define('VENDOR_PATH', THINK_PATH.'Vendor/');
defined('EXT') or define('EXT', '.php');
defined('APP_DEBUG') or define('APP_DEBUG',false); // 是否调试模式
defined('RUNTIME_FILE') or define('RUNTIME_FILE', RUNTIME_PATH.'~runtime.php');
// 为了方便导入第三方类库 设置Vendor目录到include_path
set_include_path(get_include_path() . PATH_SEPARATOR . VENDOR_PATH);