We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6a68e4 commit b42009bCopy full SHA for b42009b
src/Think.php
@@ -98,9 +98,12 @@ protected function getTemplateFile(string $template): string
98
if ('' == pathinfo($template, PATHINFO_EXTENSION)) {
99
// 获取模板文件名
100
$template = $this->parseTemplate($template);
101
- } elseif (!is_file($template)) {
102
- $path = $this->config['view_path'] ?: $this->getViewPath($this->app->http->getName());
103
- $template = $path . $template;
+ } else{
+ $path = $this->config['view_path'] ?: $this->getViewPath($this->app->http->getName());
+ if (!is_file($template)) {
104
+ $template = $path . $template;
105
+ }
106
+ $this->template->view_path = $path;
107
}
108
109
return $template;
0 commit comments