1

iframe跨域访问cookie

已有 188 阅读此文人 - - PHP,程序人生 -

今天在项目中用iframe的时候碰到了不同域名下的cookie在IE下不能获取。最后通过设置P3P完美的解决了问题。

例如:http://www.a.com 域名下使用了iframe http://www.b.com  来设置、获取b.com下的cookie,只需要在处理设置、获取cookie的动态文件使用

header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');

  • Zone Trade - 2010年05月7日

    ╭︿︿︿╮
    {/-●●-/}
    ( (oo) )
    ︶︶︶
    Continue to work , tomorrow will be better!

期待你一针见血的评论,Come on!

不用想啦,马上 "登录"  发表自已的想法.