A domain Name page called B domain name php,php in the read and write cookies are empty, there is a way to solve it? Thanks a lot

Source: Internet
Author: User
A domain Name page called B domain name php,php in the read and write cookies are empty, there is a way to solve it? Thank you!
http://www.test1.com/called with JS
http://www.test2.com/test.php

The read-write cookie function found in PHP does not work.
Setcookie ("TestCookie", $value, Time () +3600);
$phpcookies = $_cookie[' TestCookie ');


What's the problem, please?
Thank you!

Share to:


------Solution--------------------
Would you please enter $value to see if it is a null value?
------Solution--------------------
Reference:
you enter $value first to see is not a null value?

Is "output", typos ...

------Solution--------------------
Cookie value cannot be accessed across domains
------Solution--------------------
A cookie is bound to a domain name and can be passed as a parameter to a cookie.
------Solution--------------------
Browsers are prohibited from cross-domain.
------Solution--------------------
A.com The following cookie can only be accessed by a.com PHP below, B.Com is not accessible.
------Solution--------------------
Cross-domain parameters are best to pass parameters
------Solution--------------------
JS does not support cross-domain ...
------Solution--------------------
Reference:
The browser is prohibited from cross-domain.

Http://www.test2.com/test.php?XXXX=XXXXXX
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.