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.
精彩评论