PHP Java 设置cookie方法

时间:2024-03-28 17:05:32

 

Java

Cookie cookie = new Cookie(COOKIE_NAME, encrypt_cookieV);
cookie.setMaxAge(60 * 60);
cookie.setPath("/");
response.addCookie(cookie);

PHP

setcookie($cookie_name,$cookie_value,time()+3600*1,'',$headers['HOST'])

相关文章