取消 MODULE_PATH 常量 用 App::$modulePath 替代

This commit is contained in:
thinkphp
2016-06-14 14:57:12 +08:00
parent 09a7b91fef
commit 5e7c8e9902
4 changed files with 13 additions and 6 deletions

View File

@@ -11,6 +11,7 @@
namespace think\view\driver;
use think\App;
use think\exception\TemplateNotFoundException;
use think\Log;
use think\Request;
@@ -91,8 +92,8 @@ class Php
*/
private function parseTemplate($template)
{
if (empty($this->config['view_path']) && defined('MODULE_PATH')) {
$this->config['view_path'] = MODULE_PATH . 'view' . DS;
if (empty($this->config['view_path'])) {
$this->config['view_path'] = App::$modulePath . 'view' . DS;
}
if (strpos($template, '@')) {