A domain name page calls php under B domain name, and php reads and writes cookies are empty. Is there A solution? Thank you! Www.test1.com calls www. test2.comtest. php using js and finds that the cookies written in php do not work. Setcookie (TestCookie, $ value, time () + 3600); $ phpco A domain name page calls php under B domain name, and php reads and writes cookies are empty. Is there A solution? Thank you!
Http://www.test1.com/call with JS
Http://www.test2.com/test.php
I found that all the cookies written in php do not work.
Setcookie ("TestCookie", $ value, time () + 3600 );
$ Phpcookies = $ _ COOKIE ['testcooker'];
What is the problem?
Thank you!
Share:
------ Solution --------------------
Enter $ value first to see if it is a null value?
------ Solution --------------------
Reference:
Enter $ value first to see if it is a null value?
Is "output", the error is...
------ Solution --------------------
The cookie value cannot be accessed across domains.
------ Solution --------------------
Cookie is bound to a domain name. you can pass the cookie as a parameter.
------ Solution --------------------
The browser prohibits cross-origin.
------ Solution --------------------
Cookies Under a.com can only be accessed by php under a.com, but cannot be accessed by B .com.
------ Solution --------------------
Cross-origin parameters are recommended to pass parameters.
------ Solution --------------------
Js does not support cross-origin...
------ Solution --------------------
Reference:
The browser prohibits cross-origin.
Http://www.test2.com/test.php? XXXX = XXXXXX