浏览代码

!22 修复环境变量 env 中设置 app_debug 后出现前后端不一致的问题。
Merge pull request !22 from F4NNIU/env_config_debug

F4NNIU 8 年之前
父节点
当前提交
2a00751b81
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      application/config.php

+ 3 - 2
application/config.php

@@ -9,6 +9,7 @@
 // +----------------------------------------------------------------------
 // +----------------------------------------------------------------------
 // | Author: liu21st <liu21st@gmail.com>
 // | Author: liu21st <liu21st@gmail.com>
 // +----------------------------------------------------------------------
 // +----------------------------------------------------------------------
+use think\Env;
 
 
 return [
 return [
     // +----------------------------------------------------------------------
     // +----------------------------------------------------------------------
@@ -17,9 +18,9 @@ return [
     // 应用命名空间
     // 应用命名空间
     'app_namespace'          => 'app',
     'app_namespace'          => 'app',
     // 应用调试模式
     // 应用调试模式
-    'app_debug'              => true,
+    'app_debug'              => Env::get('app.debug', true),
     // 应用Trace
     // 应用Trace
-    'app_trace'              => false,
+    'app_trace'              => Env::get('app.trace', false),
     // 应用模式状态
     // 应用模式状态
     'app_status'             => '',
     'app_status'             => '',
     // 是否支持多模块
     // 是否支持多模块