PHP foreground uses interface to request background, set cookie, and then request background authentication, but cookie cannot be obtained?


The foreground code is deployed under top level domain name and the background interface code is deployed under Second-level domain. The foreground requests the background interface to set setcookie (‘msg’,’ $ send, time () plus 300,”,’’); If the foreground page requests the background interface again, it needs to verify that $send is correct, but the cookie cannot be obtained. Seek a solution

Eighty percent is the scope of the cookie’s domain name. …