内核更新

This commit is contained in:
2016-12-28 10:41:09 +08:00
parent c89254e12a
commit ffab826db0
65 changed files with 1194 additions and 610 deletions

View File

@@ -99,6 +99,22 @@ class Cookie
$_COOKIE[$name] = $value;
}
/**
* 永久保存Cookie数据
* @param string $name cookie名称
* @param mixed $value cookie值
* @param mixed $option 可选参数 可能会是 null|integer|string
* @return void
*/
public static function forever($name, $value = '', $option = null)
{
if (is_null($option) || is_numeric($option)) {
$option = [];
}
$option['expire'] = 315360000;
self::set($name, $value, $option);
}
/**
* 判断Cookie数据
* @param string $name cookie名称
@@ -133,7 +149,7 @@ class Cookie
}
return $value;
} else {
return null;
return;
}
}