2013-02-20 77 views
0

在下载的模块是有特定的呼叫Mage::getModel('module/statistic_collection'),这给了我的failed to open stream: No such file or directory误差与路径Namespace/Module/Model/Statistic/Collection.php但在Namespace/Module/Model/Mysql4/Statistic/Collection.php存在。
那么我怎么能告诉magento他们需要添加Mysql4文件夹?Magento的收集上Mysql4 =没有这样的文件或目录

+1

尝试从'法师改变它:: getModel( '模块/ statistic_collection')''到法师:: getModel('模块/统计') - > getCollection()' – Kalpesh 2013-02-20 19:16:40

回答

2

你有两个选择:

Mage::getResourceModel('module/statistics_collection') 

Mage::getModel('module/statistics')->getCollection() 
+0

好的非常感谢你...事实上,之前有Mage :: getResourceModel,但我读了getModel + getCollection == getResourceModel,所以我将其替换,并得到这个错误...所以我的问题不是这样,但我发现它是因为你的提示:-) – Shadowbob 2013-02-21 09:59:55

相关问题