From 81c5761f978680405e7a738966712f2c613fd9bf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 2 Jan 2016 20:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/view.php b/library/think/view.php index ef61044e..1044e815 100644 --- a/library/think/view.php +++ b/library/think/view.php @@ -250,7 +250,7 @@ class View } elseif (Cookie::get('think_theme')) { $theme = Cookie::get('think_theme'); } - if (!is_dir(APP_PATH . $module . '/' . $this->config['view_layer'] . '/' . $theme)) { + if (!is_dir(APP_PATH . ($module ? $module . DS : '') . $this->config['view_layer'] . DS . $theme)) { $theme = $this->config['default_theme']; } Cookie::set('think_theme', $theme, 864000); @@ -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 ? $module . '/' : '') . $this->config['view_layer'] . '/'; + $tmplPath = defined('TMPL_PATH') ? TMPL_PATH . $module . DS : APP_PATH . ($module ? $module . DS : '') . $this->config['view_layer'] . DS; } return $tmplPath . $theme; }