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!
Reply to discussion (solution)
Enter $ value first to see if it is a null value?
Enter $ value first to see if it is a null value?
Is "output", the error is...
The cookie value cannot be accessed across domains.
Cookie is bound to a domain name. you can pass the cookie as a parameter.
Cookie is bound to a domain name. you can pass the cookie as a parameter.
Is there an example? Thank you, prawn!
The browser prohibits cross-origin.
Cookies Under a.com can only be accessed by php under a.com, but cannot be accessed by B .com.
Cross-origin parameters are recommended to pass parameters.
Js does not support cross-origin...
The browser prohibits cross-origin.
Http://www.test2.com/test.php? XXXX = XXXXXX