From eed93e4d52872e5ab97e0b7a248e2d2b5af5eb94 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 16 Mar 2016 23:36:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=BC=95=E6=93=8E=E7=9A=84=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=20=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E8=AE=BE=E7=BD=AE=20tem?= =?UTF-8?q?plate.type=20=E6=88=96=E8=80=85=E4=B8=BA=E7=A9=BA=20=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E4=B8=BAthink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/think/View.php b/library/think/View.php index 7ef74698..5f511afe 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -40,14 +40,15 @@ class View // 视图驱动命名空间 'namespace' => '\\think\\view\\driver\\', // 模板引擎配置参数 - 'template' => [ - 'type' => 'think', - ], + 'template' => [], ]; public function __construct(array $config = []) { $this->config($config); + if (!isset($this->config['template']['type'])) { + $this->config['template']['type'] = 'think'; + } } /** @@ -122,6 +123,7 @@ class View if (empty($this->config['view_path']) && defined('VIEW_PATH')) { $this->config['view_path'] = VIEW_PATH; } + $config = array_merge($config, [ 'view_path' => $this->config['view_path'], 'view_suffix' => $this->config['view_suffix'], From dcee66e4cd056db12f34d2e60c4ab69e8392c60d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 17 Mar 2016 08:42:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=9D=E8=AF=81$=5FREQUEST=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/think/App.php b/library/think/App.php index 6f88a9ab..924412a0 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -373,6 +373,8 @@ class App // 路由无效默认分析为模块/控制器/操作/参数...方式URL $result = Route::parseUrl($_SERVER['PATH_INFO'], $depr); } + //保证$_REQUEST正常取值 + $_REQUEST = array_merge($_POST, $_GET, $_COOKIE); // 注册调度机制 self::dispatch($result); }