SMF 在浏览器上显示原始 HTML 和 PHP
我是 SMF 新手。
我刚刚在我的网站上安装了 SMF。我尝试编辑index.template.php。保存更改后,它会在浏览器上显示原始 HTML 和 PHP。我尝试通过将页面返回到原始状态来修复该问题,但无济于事。
目前,前端和后端一切都是乱码。
请问我该怎么办?
I am new to SMF.
I just installed SMF on my website. I tried editing the index.template.php . After saving changes, it displays raw HTML and PHP on the browser. I tried fixing the prob by returning the the page back to the original state to no avail.
At the moment, everything is gibberish both frontend and backend.
Pls what do i do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
文件顶部(每个 .php 文件的顶部)至少应该有一个开放标记。确保您没有删除此标签。
之外的所有内容都被解释为普通文本,因此如果您删除了它,它就会解释您的问题。
There should be at least an open tag at the top of the file (at the top of every .php file). Make sure you didn't remove this tag. Everything outside of a
<?php
is interpreted as normal text so if you have removed this it would explain your issue.另外,作为 SMF 的前团队成员,我可以向您保证,最好创建默认主题的副本,然后对该主题进行编辑。然后,如果您遇到错误,您可以随时在 url 中传递一个参数来重置为默认主题(以防您需要进入管理区域)。为此,请以 index.php?theme=1 结束 url
Also, being an ex-team member for SMF I can assure you its better to create a copy of the default theme, then make your edits to that theme. Then if you experience an error you can always pass a param in the url to reset to the default theme (in case you need to get into the admin area). To do so end the url with index.php?theme=1