Zend framework2 ZF2如何在错误路由后隐藏消息错误
我想在错误的路由后返回404错误,而不是php致命错误长消息Zend framework2 ZF2如何在错误路由后隐藏消息错误,zend-framework2,routes,Zend Framework2,Routes,我想在错误的路由后返回404错误,而不是php致命错误长消息 Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'No RouteMatch instance provided' i 如何操作?在应用程序模块中的module.config数组中更改此选项: 'error/404' => __DIR__ . '/../view/error/40
Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException'
with message 'No RouteMatch instance provided' i
如何操作?在应用程序模块中的module.config数组中更改此选项:
'error/404' => __DIR__ . '/../view/error/404.phtml'
或者只需在以下位置编辑404.phtml
视图文件:
Application/view/error/404.phtml
谢谢你的确认。更改项目后,此模板工作正常,我将调试有问题的项目以找出问题所在。