接近我可以告诉它客户时间是什么并不重要. PHP根据unix时间码设置过期时间.该时间的任何变化都应该与服务器一起存在.
以下是PHP manual for setcookie()的摘录:
expire:
The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words,you’ll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime(). time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0,or omitted,the cookie will expire at the end of the session (when the browser closes).