yaf icon indicating copy to clipboard operation
yaf copied to clipboard

error.php错误处理模板引用问题.

Open km3945 opened this issue 8 years ago • 3 comments

qq 20160526162433

如图:我在USER中定义了错误处理控制器.按逻辑应该到view/user/找error.phtml模板文件,但当前只会到默认view/index/去找默认的error.phtml模板.

我当前在/user/error.php中用$this->display()指定模板解决的

不知道该情况是否为一BUG

km3945 avatar May 26 '16 08:05 km3945

module的view不在这里,你搞错了,你的User module的view应该在你的User目录下,和User\controllers同级

wenjun1055 avatar May 26 '16 08:05 wenjun1055

我改过.在插件里把所有模板定位到了/views/moduleName里 即便 不做此修改,它也会读取index里的error

km3945 avatar May 26 '16 09:05 km3945

@km3945 其实不用每个module用一个Error.php, 公用一个里面通过判断来处理就行。

qloog avatar Aug 28 '17 07:08 qloog