编辑 - 解决方案---------------------
我在require_once'app / Mage.php'之后添加了以下行;
require_once 'app/Mage.php'; Mage::app('main');EDIT -- SOLUTION ---------------------
I added the following line after require_once 'app/Mage.php';
require_once 'app/Mage.php'; Mage::app('main');where 'main' is my store's code. I have only one store in Magento.
I found this solution in another file I'm using which contains require_once 'app/Mage.php' but doesn't give an error. I don't know why it worked, but it did.
最满意答案
查看堆栈跟踪错误发生在这里:
app / code / core / Mage / Core / Model / App.php(491):Mage_Core_Model_App-> getStore();
你能给我们更多的背景知识吗? 你的网站有用吗? 您最近是否更改了商店设置,例如删除了商店?
如果您使用其他浏览器或其他计算机访问您的网站,那该工作吗?
Cookie用于告诉Magento您要访问的商店,请尝试删除所有Cookie。
还有什么? 可能是XML文件丢失或错误,并且Magento配置无法找到存储设置。
尝试其中一些然后请提供更多背景信息:例如,这是一个新的Magento安装吗? 你可以访问Magento管理页面吗? 这有用吗? 你在制作吗? 德韦; OPMET? 在XAMP上本地运行? 最近改变了你的商店配置? 最近更改或移动了XML文件? 切换到一个新的主题?
I added Mage::app('main'); after require_once 'app/Mage.php';
require_once 'app/Mage.php'; Mage::app('main');where 'main' is my store's code. I have only one store in Magento.
I found this solution in another file I'm using which contains require_once 'app/Mage.php' but doesn't give an error. I don't know why it worked, but it did.
更多推荐
发布评论