setcookie("TEST", "value", 3600, "/dir", ".domains.com", true); 分别代表 【cookie名,cookie值,保存时间,cookie保存路径,起效域名,https发送,】 注意:使用PHP cookie 当场不能生效,需要刷新一次