Ric*_*nop 0 php zend-framework
如何在ErrorController中获取控制器和操作名称?我指的是发生异常的控制器和动作.例如,如果我去:
/bogusController/bogusAction
Run Code Online (Sandbox Code Playgroud)
我想得到"bogusController"和"bogusAction".呼叫:
$this->_request->getControllerName();
$this->_request->getActionName();
Run Code Online (Sandbox Code Playgroud)
返回"错误"和"错误".
原始请求存储在error_handler参数中: $this->_getParam('error_handler')->request->getControllerName();
归档时间: |
|
查看次数: |
382 次 |
最近记录: |