Skip to content

Commit

Permalink
改进模板输出
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Jan 7, 2025
1 parent 0bbc21b commit 1338d3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/think/view/driver/Php.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ private function parseTemplate(string $template): string
[$app, $template] = explode('@', $template);
} elseif ($request->layer()) {
$app = $request->layer();
$controller = $request->controller(true, true);
$controller = $request->controller(false, true);
}

if ($this->config['view_path'] && !isset($app)) {
if ($this->config['view_path']) {
$path = $this->config['view_path'];
} else {
$appName = isset($app) ? $app : $this->app->http->getName();
$appName = $app ?? $this->app->http->getName();
$view = $this->config['view_dir_name'];

if (is_dir($this->app->getAppPath() . $view)) {
Expand Down

0 comments on commit 1338d3d

Please sign in to comment.