mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
注释规范
This commit is contained in:
@@ -124,7 +124,8 @@ class Cookie
|
|||||||
$prefix = $prefix ? $prefix : $config['prefix'];
|
$prefix = $prefix ? $prefix : $config['prefix'];
|
||||||
$name = $prefix . $name;
|
$name = $prefix . $name;
|
||||||
setcookie($name, '', time() - 3600, $config['path'], $config['domain'], $config['secure'], $config['httponly']);
|
setcookie($name, '', time() - 3600, $config['path'], $config['domain'], $config['secure'], $config['httponly']);
|
||||||
unset($_COOKIE[$name]); // 删除指定cookie
|
// 删除指定cookie
|
||||||
|
unset($_COOKIE[$name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,7 +144,7 @@ class Cookie
|
|||||||
$config = self::$config;
|
$config = self::$config;
|
||||||
$prefix = $prefix ? $prefix : $config['prefix'];
|
$prefix = $prefix ? $prefix : $config['prefix'];
|
||||||
if ($prefix) {
|
if ($prefix) {
|
||||||
// 如果前缀为空字符串将不作处理直接返回
|
// 如果前缀为空字符串将不作处理直接返回
|
||||||
foreach ($_COOKIE as $key => $val) {
|
foreach ($_COOKIE as $key => $val) {
|
||||||
if (0 === strpos($key, $prefix)) {
|
if (0 === strpos($key, $prefix)) {
|
||||||
setcookie($key, '', time() - 3600, $config['path'], $config['domain'], $config['secure'], $config['httponly']);
|
setcookie($key, '', time() - 3600, $config['path'], $config['domain'], $config['secure'], $config['httponly']);
|
||||||
|
|||||||
Reference in New Issue
Block a user