From fb4e38f665e700b3c7df34882c3f7abb2a4b8f61 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Sep 2016 15:35:57 +0800 Subject: [PATCH] =?UTF-8?q?app=5Finit=E6=A0=87=E7=AD=BE=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E5=92=8C=E8=AF=B7=E6=B1=82=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index 92eb59fa..7e54f913 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -79,20 +79,20 @@ class App { is_null($request) && $request = Request::instance(); - $config = self::initCommon(); - if (defined('BIND_MODULE')) { - // 模块/控制器绑定 - BIND_MODULE && Route::bind(BIND_MODULE); - } elseif ($config['auto_bind_module']) { - // 入口自动绑定 - $name = pathinfo($request->baseFile(), PATHINFO_FILENAME); - if ($name && 'index' != $name && is_dir(APP_PATH . $name)) { - Route::bind($name); - } - } - - $request->filter($config['default_filter']); try { + $config = self::initCommon(); + if (defined('BIND_MODULE')) { + // 模块/控制器绑定 + BIND_MODULE && Route::bind(BIND_MODULE); + } elseif ($config['auto_bind_module']) { + // 入口自动绑定 + $name = pathinfo($request->baseFile(), PATHINFO_FILENAME); + if ($name && 'index' != $name && is_dir(APP_PATH . $name)) { + Route::bind($name); + } + } + + $request->filter($config['default_filter']); // 开启多语言机制 if ($config['lang_switch_on']) {