回"问题补充"PHP手册上关于setcookie函数的expire参数有这样一个解释If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes). 如果设为0 或者忽略该参数, cookie将在session结束时(关闭浏览器时)过期所以, 如果要写4,5个参数, 那把第三个设为0就可以了