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'];