Home >Backend Development >PHP Tutorial >Share the method of php using P3P to complete COOKIE cross-domain operations
First: Create a_setcookie.php file:
Then: Create a_getcookie.php file:
Finally: Create b_setcookie.php file: Three After the files are created, access them sequentially through the browser:
while visiting the b.com domain, and There is no cookie value set in the a.com domain. Then, modify the a_setcookie.php file and remove the comment symbols. a_setcookie.php is:
Visit through the browser again:
to see if cross-domain has been implemented Visited. |