Ec (2); in the past, I did not really care about the cookie scope. It may have been used before. there was no problem with the com domain name. I tested it with a company's cn Domain Name today, so I could not share cookies. Later I used js to set cookies and shared them on another server, really irritating! I read the php cookie specification, which contains the Onlyhostswithinthespecifieddomaincanset script ec (2); script
I did not really care about the cookie scope in the past. It may have been used before. there was no problem with the com domain name. I tested it with a company's cn Domain Name today, so I could not share cookies. Later I used js to set cookies and shared them on another server, really irritating! I read the php cookie specification, which contains such a section.
Only hosts within the specified domain can set a cookie for a domain and domains must have at least two (2) or three (3) periods in them to prevent domains of the form :". com ",". edu ", and" va. us ". any domain that fails within one of the seven special top level domains listed below only require two periods. any other domain requires at least three. the seven special top level domains are: "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT ".
Let's see it. It's a pretty cool! In addition to the "COM", "EDU", "NET", "ORG", "GOV", "MIL", and "INT" suffixes, domain names can be configured with secondary scopes, other domain names must be at least three levels. That is to say, you cannot use php to share cookies under a. B .cn and c. B .cn by setting the scope to B .cn, php can only implement cookie sharing between d. B .a.cn and e. B .a.cn under the scope B .a.cn. I hope you will pay attention to this problem and avoid wasting your time to test it ......