dtf579777 2013-06-10 09:56
浏览 42

在PHP中设置cookie。 适用于FF和Chrome,但不适用于IE

I am trying to add a cookie, which works fine in firefox and chrome, but is not working in IE.

Here's the code:

ob_start( 'ob_gzhandler' );
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

$expires = time()+60*60*24*30;
setcookie( 'aff_source', $value, $expires, '/', '.subdomain.domain.in', false, true );

I am not sure why it's not setting the cookie in IE. Would appreciate any pointers.

IE version: 8
Checked with  - IE developer toolbar

I have looked at the answers in SO for similar problems, but am not able to solve it.

Thanks.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 虚拟机打包apk出现错误
    • ¥30 最小化遗憾贪心算法上界
    • ¥15 用visual studi code完成html页面
    • ¥15 聚类分析或者python进行数据分析
    • ¥15 逻辑谓词和消解原理的运用
    • ¥15 三菱伺服电机按启动按钮有使能但不动作
    • ¥15 js,页面2返回页面1时定位进入的设备
    • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
    • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝