十月CMS:错误登录前端

时间:2017-06-05 17:39:42

标签: octobercms

当我在服务器上更新后端时,可能会发生错误。如果是,则会显示错误日志。有没有办法隐藏整个世界的所有细节,只显示如下:“发生错误。”对于管理员?

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

在撰写本文时,10月安装调试模式已关闭。您应该在生产中启用它。打开PHP文件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