从/foo/controllers/
调用以下代码时:
setcookie(
"email", $email, time() + 100 * 60 * 60 * 24 * 30,
"/foo/", "bar.com", false
);
它获得了价值(从FireBug复制):
# line-breaks added for aesthetics
email=stackoverflowuser95%40gmail.com;
expires=Sun, 24 Jan 2021 06:25:33 GMT;
path=/foo/controllers/; domain=bar.com
如何设置Cookie以使Cookie对/foo/controllers/
和/foo/views/
有效?