setcookie(‘aaa’, 111); //默认关闭浏览器就销毁 setcookie('aaa', 111, time() + 3600, '/'); //设置一小时 转载于:https://www.cnblogs.com/wangyuyanhello/p/8309437.html