Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道使用 setcookie 和过去的 datetime 过期 cookie 和使用 unset($_COOKIE) 有什么区别?区别在哪里?
通过 HTTP Cookie 传递给当前脚本的变量关联数组。
来源。
因此,unset()添加成员不应影响实际的 cookie。
unset()
您应始终设置已通过的日期时间以删除 cookie。