PHP Java 设置cookie方法

 

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'])
posted @ 2014-07-02 16:04  Crawford  阅读(207)  评论(0编辑  收藏  举报