SMF 论坛 - 模板解析错误而不是正常的 PHP 错误
目前,我正在开发一个最初使用 SMF 论坛 创建的现有网站。问题是我每次代码中出现错误时,只会显示:
模板解析错误!
论坛上的模板系统似乎有些变味了。此问题应该只是暂时的,因此请稍后返回并重试。如果您继续看到此消息,请联系管理员。您也可以尝试刷新此页面。
这在开发过程中确实很烦人。如何设置 SMF 论坛来显示错误?
文件 index.php
已经包含以下代码:
error_reporting(E_ALL);
ini_set('display_errors', 1);
Currently I am working on an existing website that was initially created using SMF Forum. The problem is that I every time an error occurs in the code, it will only display:
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.You can also try refreshing this page.
This is really annoying during development. How do I setup SMF Forum to display errors?
The file index.php
does already contain the following codes:
error_reporting(E_ALL);
ini_set('display_errors', 1);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了。
由于我在注册页面上收到错误,因此我尚未登录。要查看有关错误的更多信息,您需要拥有管理员权限。
所以我登录并导航到注册页面并看到错误消息。
The problem is solved.
As I was getting the error on the registration page, I was not logged in. To see more information about errors, you will need to have Administrator privileges.
So I logged in and navigated to the registration page and saw the error message.