Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 辅助类Magento 1.9出现致命错误_Php_Magento - Fatal编程技术网

Php 辅助类Magento 1.9出现致命错误

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<

我是马根托的新手。我已经创建了一个助手类

/app/etc/modules/Mytrends\u MyFunctions.xml文件:

<?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();