【发布时间】:2010-04-26 08:12:15
【问题描述】:
在一个域上我使用命令为::
setcookie( "cookiename", "cookievalue", time()+86400, "/", "domain1.com" );
在其他领域我使用像素代码作为
<img src="http://domain1.com/?action=trackcookie" width=1 height=1 />
该 url 无法读取 cookie ,但直接调用时相同的 url 能够读取 cookie。当我将 htat url 作为像素代码放在其他域上时。它无法读取值。
这可能是什么问题??
最好的问候, 萨蒂什·卡勒普
嗨,是的,我也检查了 httpwatch 和 firebug..
http://www.domain1.com/tracking.php?action=setcookie 该网址放置cookie:
Set-Cookie topinno=1; expires=Tue, 27-Apr-2010 09:24:16 GMT; path=/
Set-Cookie newkhan=%3A+2010-04-26+14%3A54; expires=Thu, 06-May-2010 09:24:16 GMT; path=/
在 domain2 上,此 url 被称为:在 iframe 标记中..
http://www.domain1.com/tracking.php?leadno=CREATEDLEADNO&city=CITYOFTHELEAD
那么那些 cookie 就不会来了……
但是当我直接调用相同的 url 时。我再次能够看到请求中的 cookie:
PHPSESSID=diebgrgusqofs2gckahu2nbm04; topinno=1; newkhan=%3A+2010-04-26+14%3A54; __utma=97007629.526966387.1270733785.1272261298.1272265835.45; __utmz=97007629.1270733785.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
【问题讨论】:
-
重新更新:是吗? bobince 和我解释了为什么会这样。