开发者

Using PHP, how can I make a cookie expire after the browser is closed?

Using PHP, how can I make a cookie expire after the browser i开发者_如何学运维s closed?


Just don't set an expiry time. That will make it a session cookie.

This is mentioned in the documentation for the expire argument to setcookie:

If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜