diff --git a/library/think/view.php b/library/think/view.php index d3503fc9..ef61044e 100644 --- a/library/think/view.php +++ b/library/think/view.php @@ -276,7 +276,7 @@ class View $tmplPath = $this->config['view_path']; // 模块设置独立的视图目录 if (!$tmplPath) { // 定义TMPL_PATH 则改变全局的视图目录到模块之外 - $tmplPath = defined('TMPL_PATH') ? TMPL_PATH . $module . '/' : APP_PATH . $module . '/' . $this->config['view_layer'] . '/'; + $tmplPath = defined('TMPL_PATH') ? TMPL_PATH . $module . '/' : APP_PATH . ($module ? $module . '/' : '') . $this->config['view_layer'] . '/'; } return $tmplPath . $theme; }