From 02f8e8a9099c534d1b2c38385fcf1fa5404694d4 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 28 Apr 2017 17:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=B1=BB=E5=BA=93=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4=E9=87=87?= =?UTF-8?q?=E7=94=A8APP=5FNAMESPACE=E5=B8=B8=E9=87=8F=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index 7a0d40a6..f6ed5fdf 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -414,9 +414,9 @@ class App public static function initCommon() { if (empty(self::$init)) { - $array = include CONF_PATH . 'config' . CONF_EXT; - // 注册应用命名空间 - self::$namespace = $array['app_namespace']; + if (defined('APP_NAMESPACE')) { + self::$namespace = APP_NAMESPACE; + } Loader::addNamespace(self::$namespace, APP_PATH); // 初始化应用