mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进一处引用传值
This commit is contained in:
@@ -153,9 +153,9 @@ class Template
|
|||||||
$template = $this->parseTemplateFile($template);
|
$template = $this->parseTemplateFile($template);
|
||||||
$cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($template) . $this->config['cache_suffix'];
|
$cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($template) . $this->config['cache_suffix'];
|
||||||
if (!$this->checkCache($template, $cacheFile)) {
|
if (!$this->checkCache($template, $cacheFile)) {
|
||||||
// 缓存无效
|
// 缓存无效 重新模板编译
|
||||||
// 模板编译
|
$content = file_get_contents($template);
|
||||||
$this->compiler(file_get_contents($template), $cacheFile);
|
$this->compiler($content, $cacheFile);
|
||||||
}
|
}
|
||||||
// 页面缓存
|
// 页面缓存
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -185,8 +185,7 @@ class Template
|
|||||||
}
|
}
|
||||||
$cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($content) . $this->config['cache_suffix'];
|
$cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($content) . $this->config['cache_suffix'];
|
||||||
if (!$this->checkCache($content, $cacheFile)) {
|
if (!$this->checkCache($content, $cacheFile)) {
|
||||||
// 缓存无效
|
// 缓存无效 模板编译
|
||||||
// 模板编译
|
|
||||||
$this->compiler($content, $cacheFile);
|
$this->compiler($content, $cacheFile);
|
||||||
}
|
}
|
||||||
// 读取编译存储
|
// 读取编译存储
|
||||||
|
|||||||
Reference in New Issue
Block a user