mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进视图驱动类
This commit is contained in:
@@ -55,9 +55,12 @@ class Php
|
||||
*/
|
||||
public function fetch($template, $data = [])
|
||||
{
|
||||
if (!is_file($template)) {
|
||||
// 获取模板文件名
|
||||
$template = $this->parseTemplate($template);
|
||||
}
|
||||
// 模板不存在 抛出异常
|
||||
$template = $this->exists($template);
|
||||
if (!$template) {
|
||||
if (!is_file($template)) {
|
||||
throw new Exception('template file not exists:' . $template, 10700);
|
||||
}
|
||||
// 记录视图信息
|
||||
|
||||
Reference in New Issue
Block a user