超级计算机囧囧囧's Archivers

From admin on 2012-10-16 00:46:23

Magento中Session使用

1 存储
require 'app/Mage.php';
// Initialize Magento Mage::app("default");
// You have two options here,
// "frontend" for frontend session or "adminhtml" for admin session
Mage::getSingleton("core/session", array("name" => "frontend"));
$_SESSION['website'] = 'www.sunhaibing.com';
2 读取
Mage::getSingleton("core/session", array("name" => "frontend"));
$website = $_SESSION['website'];

查看完整版本: Magento中Session使用

Tags: magento


©超级计算机囧囧囧