如何打开 magento 错误消息? [英] How to turn on magento error messages?
问题描述
我已经安装了 Magento 社区版并尝试创建我的第一个简单的 hello world 模块.几个小时后,我终于让它工作了.
I have installed Magento Community edition and tried creating my first simple hello world module. After a few hours I finally got it working.
我的问题是我在一些 XML 标签中使用了错误的大小写.
My issues were I had used incorrect casing in some of the XML tags.
在尝试让它工作时,我尝试加载页面,但显示未找到消息,但没有错误.
While trying to get it to work I tried to load the page a not found message was displayed, but no error.
我在管理控制面板中打开了错误<代码>系统>配置>开发人员记录设置并写了一行我知道应该抛出错误但我只是得到一个空白屏幕
I have switched errors on in the admin control panel System > Configuration > Developer > Log Settings
and wrote a line which I know should have thrown an error but I just got a blank screen
- 如何在 Magento 中显示错误?
- 当我在 xml 文件中使用不正确的大小写时,这是否被视为错误,或者是我不会收到错误消息的问题?如果是这种情况,我将如何快速找到导致问题的文件(显然目前不是问题,但我可以想象,随着模块的运行,将很难找到导致问题的单个外壳问题问题)
推荐答案
用于启用错误报告
在索引页面中更改以下内容:
In Index page change the following:
error_reporting(E_ALL | E_STRICT);
到
error_reporting(E_ALL);
设置 $_SERVER['MAGE_IS_DEVELOPER_MODE'] = true
并取消注释此行
#ini_set('display_errors', 1);
在 Errors 文件夹中,将 local.xml.sample
重命名为 local.xml
.
In Errors folder rename local.xml.sample
to local.xml
.
希望对您有所帮助.
这篇关于如何打开 magento 错误消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!