开发者

How to get expiration time from setcookie()?

I have a cookie, which is working with ssl only:

$data = $users->customer->getUse开发者_运维技巧rnames();
$data = join(",", $data);
setcookie('test_cookie', $data, time()+3600, '/root/en/server/', 
          'server.test.com', true);

Now, how can i get time of this cookie?


The cookie contents sent in the HTTP request to your server only includes the variables/values that you set in the cookie, not the expiration time. If you want, you can "pad" the cookie value to include the expiration time each time you set it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜