改进view类的模板文件路径

This commit is contained in:
thinkphp
2016-01-02 20:30:32 +08:00
parent e6667c6d20
commit 194387daa0

View File

@@ -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;
}