mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进cookie助手函数支持 判断是否存在某个cookie值
This commit is contained in:
@@ -327,7 +327,7 @@ if (!function_exists('cookie')) {
|
||||
Cookie::clear($value);
|
||||
} elseif ('' === $value) {
|
||||
// 获取
|
||||
return Cookie::get($name);
|
||||
return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1), $option) : Cookie::get($name);
|
||||
} elseif (is_null($value)) {
|
||||
// 删除
|
||||
return Cookie::delete($name);
|
||||
|
||||
Reference in New Issue
Block a user