PHP:如何在iframe中使用不同域名的会话/cookie?

PHP:如何在iframe中使用不同域名的会话/cookie?,php,cookies,iframe,session-cookies,Php,Cookies,Iframe,Session Cookies,我在服务器1上得到了这个简单的脚本 <iframe src="https://server2/index.php" width=800 height=800> 并在服务器2上 index.php <?php session_start(); $_SESSION['test'] = 'test'; ?> <body> <a href="index2.php">

我在服务器1上得到了这个简单的脚本

<iframe src="https://server2/index.php" width=800 height=800>

并在服务器2上

index.php

    <?php session_start();
    $_SESSION['test'] = 'test';
    ?>
   <body>
         <a href="index2.php">Go !</a>
   </body>

index2.php

<?php session_start();
print_r($_SESSION);

你试过了吗?是的,我做过,也没做过。这个“问题”是最近才出现的。这些是新的第三方cookies策略