From a880485ace787d3a5fc8951f336e2f32e264edf4 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 15 Mar 2016 21:49:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BView=20=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=88=9D=E5=A7=8B=E5=8C=96engine=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=20view=5Fpath=E4=B8=BA=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/think/View.php b/library/think/View.php index 577761b7..f47a7d24 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -118,7 +118,10 @@ class View if ('php' == $engine) { $this->engine = 'php'; } else { - $class = $this->config['namespace'] . ucwords($engine); + $class = $this->config['namespace'] . ucfirst($engine); + 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'],