mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
改进View类
This commit is contained in:
@@ -35,6 +35,11 @@ class View
|
|||||||
if (is_array($config)) {
|
if (is_array($config)) {
|
||||||
$this->config($config);
|
$this->config($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化模板引擎
|
||||||
|
if (!empty($this->config['engine_type'])) {
|
||||||
|
$this->engine($this->config['engine_type'], $this->config['engine_config']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,10 +125,7 @@ class View
|
|||||||
{
|
{
|
||||||
// 模板变量
|
// 模板变量
|
||||||
$vars = array_merge($this->data, $vars);
|
$vars = array_merge($this->data, $vars);
|
||||||
if (is_null($this->engine)) {
|
|
||||||
// 初始化模板引擎
|
|
||||||
$this->engine($this->config['engine_type'], $this->config['engine_config']);
|
|
||||||
}
|
|
||||||
// 页面缓存
|
// 页面缓存
|
||||||
ob_start();
|
ob_start();
|
||||||
ob_implicit_flush(0);
|
ob_implicit_flush(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user