Skip to content

Commit 83f108a

Browse files
committed
改进指定文件渲染
1 parent 6a46068 commit 83f108a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/think/view/driver/Php.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function getTemplateFile(string $template): string
6363
if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
6464
// 获取模板文件名
6565
$template = $this->parseTemplate($template);
66-
} else {
66+
} elseif (!is_file($template)) {
6767
$path = $this->config['view_path'] ?: $this->getViewPath($this->app->http->getName());
6868
$template = $path . $template;
6969
}

0 commit comments

Comments
 (0)