1

从以下代码调用时/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 对/foo/controllers/and有效/foo/views/

4

0 回答 0