From eae63b56ec22b9290bd43f872acc3710b35365cf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 13 Mar 2016 22:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BView=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/View.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/View.php b/library/think/View.php index 2361e1da..697f79f6 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -39,6 +39,9 @@ class View public function __construct(array $config = []) { $this->config($config); + if (empty($this->config['view_path']) && defined('VIEW_PATH')) { + $this->config['view_path'] = VIEW_PATH; + } $engineConfig = array_merge(Config::get(), [ 'view_path' => $this->config['view_path'], 'view_suffix' => $this->config['view_suffix'],