From b599c503be20718663b501bbbe5219ee53193f0b Mon Sep 17 00:00:00 2001 From: huangdijia Date: Mon, 7 Dec 2015 17:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cookie.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/think/cookie.php b/library/think/cookie.php index 9fa6e900..6ab2a9fe 100644 --- a/library/think/cookie.php +++ b/library/think/cookie.php @@ -124,7 +124,8 @@ class Cookie $prefix = $prefix ? $prefix : $config['prefix']; $name = $prefix . $name; 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; $prefix = $prefix ? $prefix : $config['prefix']; if ($prefix) { -// 如果前缀为空字符串将不作处理直接返回 + // 如果前缀为空字符串将不作处理直接返回 foreach ($_COOKIE as $key => $val) { if (0 === strpos($key, $prefix)) { setcookie($key, '', time() - 3600, $config['path'], $config['domain'], $config['secure'], $config['httponly']);