日期:2014-05-17 浏览次数:20448 次
public function saveConfigToCookie(array $config){ setcookie("c", urlencode(serialize(($config))), time() + 9999999, "/"); }
public function loadCookieConfig() { $configCookieVal = $_COOKIE['c']; $configArray = unserialize(urldecode($configCookieVal)); return $configArray; }