-1

我想在路由错误后返回 404 错误,而不是 php Fatal Error 长消息。

Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' 
with message 'No RouteMatch instance provided' i

我该怎么做?

4

1 回答 1

0

在您的应用程序模块中的 module.config 数组中更改此内容:

'error/404'               => __DIR__ . '/../view/error/404.phtml'

或者只是编辑404.phtml视图文件:

Application/view/error/404.phtml
于 2013-09-20T01:29:01.840 回答