开发者

php cookie with domain parameter

I am unable to set a cookie in one domain and read it in another. I have tried a million different examples but i have had no luck at all.

can someone please point out what is going wrong?

domainone.com

setcookie('testcookie','cookie example',time()+30*24*60*60,'开发者_C百科/','domaintwo.com',false,true)

domaintwo.com

echo $_COOKIE[testcookie];

var_dump($_COOKIE);


This is impossible. Search for Cross Domain Cookie related questions on SO to see workarounds (though none is trivial).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜