改写View类的instance方法

This commit is contained in:
thinkphp
2015-12-24 16:15:19 +08:00
parent 0f57228759
commit 222f913eb0
4 changed files with 37 additions and 22 deletions

View File

@@ -29,7 +29,7 @@ trait View
{
// 模板引擎参数
if (is_null($this->view)) {
$this->view = new \think\View(Config::get()); // 只能这样写不然view会冲突
$this->view = \think\View::instance(Config::get()); // 只能这样写不然view会冲突
}
}