类不存在的异常不再手动捕获 系统自动捕获

This commit is contained in:
thinkphp
2013-04-01 16:18:53 +08:00
parent 7d980d41c7
commit 257de134e4
11 changed files with 37 additions and 58 deletions

View File

@@ -17,8 +17,12 @@ class Think {
$this->template = new Template($config);
}
public function fetch($template,$data=[]){
$this->template->display($template,$data);
public function fetch($template,$data=[],$cacheId=''){
if(is_file($template)) {
$this->template->display($template,$data,$cacheId);
}else{
$this->template->fetch($template,$data);
}
}
}