当我在服务器上更新后端时,可能会发生错误。如果是这样,将显示一个错误日志。有没有一种方法可以隐藏整个世界的所有细节,只显示这样的东西:“错误发生了。”为了管理员?
谢谢你的帮助。
发布于 2017-06-08 11:21:12
在编写本报告时,已关闭了10月份的调试模式。你应该在生产时启用它。打开config/app.php文件并将调试值更新为false。
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
| You can create a CMS page with route "/error" to set the contents
| of this page. Otherwise a default error page is shown.
|
*/
'debug' => true,这将将错误转换为通用错误,并由文档推荐。
http://octobercms.com/docs/setup/configuration#debug-mode
重要:始终将生产环境的
app.debug设置设置为false。
https://stackoverflow.com/questions/44374595
复制相似问题