在setcookie 方法前,添加如下 header 即可
header('P3P: CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"');
a.com/test
//b.com/get_cookie.php
header('P3P: ........');
setcookie(...)
a.com/test 可正常获取b.com/get_cookie.php 的cookie数据