调整Loader::addNamespace方法的位置 修正configTest

This commit is contained in:
thinkphp
2016-03-23 15:51:01 +08:00
parent eff3dd828c
commit 235e9f847f
2 changed files with 6 additions and 7 deletions

View File

@@ -30,9 +30,6 @@ if (!defined('APP_DEBUG')) {
define('APP_DEBUG', $debug);
}
// 注册自动加载
Loader::register();
// 加载模式定义文件
$mode = require MODE_PATH . APP_MODE . EXT;
@@ -41,6 +38,9 @@ if (isset($mode['namespace'])) {
Loader::addNamespace($mode['namespace']);
}
// 注册自动加载
Loader::register();
// 加载模式别名定义
if (isset($mode['alias'])) {
Loader::addMap($mode['alias']);