Php 辅助类Magento 1.9出现致命错误
我是马根托的新手。我已经创建了一个助手类 /app/etc/modules/Mytrends\u MyFunctions.xml文件:Php 辅助类Magento 1.9出现致命错误,php,magento,Php,Magento,我是马根托的新手。我已经创建了一个助手类 /app/etc/modules/Mytrends\u MyFunctions.xml文件: <?xml version="1.0"?> <config> <modules> <Mytrends_MyFunctions> <active>true</active> <codePool>local<
<?xml version="1.0"?>
<config>
<modules>
<Mytrends_MyFunctions>
<active>true</active>
<codePool>local</codePool>
</Mytrends_MyFunctions>
</modules>
</config>
但我犯了一个致命的错误:
Fatal error: Class 'Mytrends_MyFunctions_Helper_Data' not found in /app/Mage.php on line 548
请帮助。您必须像这样调用帮助函数:
Mage::helper('mytrends/myfunctions')->test();
请尝试此操作。请正确检查您的模块config.xml文件路径。此文件的名称不必正确:
/app/etc/modules/config.xml
应该是/app/etc/modules/Mytrends\u MyFunctions.xml
您是否尝试过刷新配置缓存?您应该真正改掉的一个坏习惯是关闭php班级。你永远不应该这样做。请阅读stackoverflow.com/questions/4410704/对不起,这是我的错误,我在这里写错了文件名。除此之外,我一眼就看不到任何错误。你确定你没有把文件放错地方吗?查看您的错误,它看起来像是来自文件/app/code/local/Mytrends/MyFunctions/Helper/Data.php
的错误,或者此帮助程序的类名键入错误。很抱歉,这是我的错误,我在这里写错了文件名。
Mage::helper('myfunctions')->test();
Fatal error: Class 'Mytrends_MyFunctions_Helper_Data' not found in /app/Mage.php on line 548
Mage::helper('mytrends/myfunctions')->test();