Did a test example, the results are everywhere is wrong, and I can not see where the wrong, help.
Http://www.test1.com/test.htm
http://www.test2.com/There are two files below
Test.js
document.write ("");
test.php
Print_r ($_cookie);
echo "";
?>
Direct Input http://www.test2.com/test.php No errors
But input http://www.test1.com/test.htm error.
One is to test the
Setcookie ("TestCookie", $value);
$_cookie["TestCookie"];
The result can not run directly, help, really forced to have no way. Thank you!
Reply to discussion (solution)
document.write (" ");
The script mark written with JS must be cut off, otherwise it will be treated as a script tag, and of course it will be wrong.
According to the moderator changed,
document.write (" ");
Hint missing identifier
Dizzy death, where the problem, thank you for your help!
You don't understand the nature of cookies, kiss!
Oh, wrong, it should be.
document.write (" ");
Cross-domain with JSONP