存取权限Magento的会议上,我有Magento的店,并用于测试目的我使用子域名无法在子域
www.example.com/shop - >店
test.example.com/ - >子域
我试图从子站点下面的代码访问的Magento会话(test.php的)
require_once 'shop/app/Mage.php';
umask(0);
Mage::app();
Mage::getSingleton('core/session', array('name' => 'frontend'));
var_dump(Mage::getSingleton('customer/session')->isLoggedIn());
像这种question并在此question并按照Magento Wiki我设置Cookie路径到
/
和Cookie域到
.example.com的
Still the test.example.com/test.php re变成错误的。此外这也让我以某种方式退出。因此,刷新另一个选项卡中的商店时,用户已注销。当从www.example.com/test.php测试相同的文件时,一切正常。
在我的情况下还有什么问题?有什么建议么?