添加 MVC默认层的常量定义

简化视图实例化
This commit is contained in:
thinkphp
2015-01-20 13:46:02 +08:00
parent 8872878e9c
commit 5b81a68e0c
6 changed files with 15 additions and 12 deletions

View File

@@ -23,12 +23,7 @@ class Controller {
*/
public function __construct(){
// 模板引擎参数
$config = [
'tpl_path' => MODULE_PATH . 'View/',
'cache_path' => RUNTIME_PATH . 'Cache/',
];
$this->view = new View();
$this->view->engine(Config::get('template_engine'), $config);
//控制器初始化
if(method_exists($this, '_initialize'))