The code above is from an example2 in the manualCode:setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1);
What does "/~rasmus/" mean?
Printable View
The code above is from an example2 in the manualCode:setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1);
What does "/~rasmus/" mean?
Hi, as you can see in the manual the fourth parameter is path:
Quote:
The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.
Thank you, Alan.
Since value is in the 2nd parameter like the following, I think, the last one "1" is not a value.Code:setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".example.com", 1);
What is the meaning of the last one "1"?Code:setcookie ("TestCookie", "$value", time() - 3600, "/~rasmus/", ".example.com", 1);
The sixth parameter "1" (bool true) indicates that the cookie should only be transmitted over a secure HTTPS connection from the client.