PHP session cookie sessionid -


I used the session in PHP and did not urlrewriting the cookie with the PHPSESSID. But when I opened the cookie I saw the key price pair But one of those paths is: /

What is the meaning of path, can you explain in detail if I change the path value to ABC / CDDDD / DD / FEC, then what does it mean?

Basically, this is part of a standard cookie

< Strong> Domains and Paths

Each cookie also has a domain and path. The domain tells the browser what cookies should be sent to. If you do not specify it, it becomes the domain of the page which sets the cookie, in case of this page www.quirksmode.org . Please note that the purpose of the domain is to allow the cookie to cross the sub-domain. My cookie will not be read by search.quirksmode.org because its domain is www.quirksmode.org Is. When I set the domain to quirksmode.org , the search can also read the sub-domain cookie. I can not set a cookie domain in the domain whose domain I am not, I can not create the domain www.microsoft.com Only quirksmode.org is permitted in this case.

The path gives you the opportunity to specify a directory where the cookie is active. So if you want to send cookies only to pages in the cgi-bin directory, set the path to / cgi-bin . Typically the path is set to / , which means that the cookie is valid in the entire domain. This script does this, so you can set the cookies on this page to be sent to any page in the www.quirksmode.org domain (although only this page has a script that searches for cookies And does

You may want.


Comments