在电脑上做网站,网站开发的前端框架有哪些,没有网站备案,专业网站制作推广服务?phpreturn [components = [errorHandler = [errorAction = site/error,],]
];
这段配置存在错误,导致错误处理无法生效。为了解决这个问题,我们需要对配置进行优化。
代码查看:yii\web\ErrorHandler::renderException
?phpprotected function ren…?phpreturn ['components' = ['errorHandler' = ['errorAction' = 'site/error',],]
];
这段配置存在错误,导致错误处理无法生效。为了解决这个问题,我们需要对配置进行优化。
代码查看:yii\web\ErrorHandler::renderException
?phpprotected function renderException($exception){if (Yii::$app-has('response')) {$response = Yii::$app-getResponse();// reset parameters of response to avoid interference with partially created response data// in case the error occurred while sending the response.$response-isSent = false;$response-stream = null;$response-data = null;$response-content = null;} else {$response = new Response();}$resp