我在PHP中通过这个调用设置了一个cookie
原文链接:https://www.f2er.com/php/135271.htmlsetcookie('alert_msg','you have the add badge');
我试过这样解开它
setcookie('alert_msg',''); setcookie('alert_msg',false); setcookie('alert_msg',false,1); setcookie('alert_msg',time()-3600); setcookie('alert_msg','',1,'/');
并且它仍然不会取消$_COOKIE [‘alert_msg’]中的cookie值.
我试过Firefox和Chrome
代码示例:
if (isset($_COOKIE['alert_msg'])) { $this->set('alert_msg',$_COOKIE['alert_msg']); unset($_COOKIE['alert_msg']); setcookie('alert_msg','/'); }