Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 cookie,它仅适用于 ssl:
$data = $users->customer->getUsernames(); $data = join(",", $data); setcookie('test_cookie', $data, time()+3600, '/root/en/server/', 'server.test.com', true);
现在,我怎样才能得到这个 cookie 的时间?
在 HTTP 请求中发送到您的服务器的 cookie 内容仅包括您在 cookie 中设置的变量/值,而不包括过期时间。如果您愿意,您可以在每次设置时“填充”cookie 值以包含到期时间。