删除其他子域中的Cookie [英] Deleting Cookies In Other Subdomains
本文介绍了删除其他子域中的Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以在PHP中删除cookie,这意味着将另一个子域中的特定子域的时间重新设置为过去的某个时间.
I was wondering if it's possible to delete a cookie in PHP, meaning re-setting it's time to a time in the past, for a specific subdomain from another subdomain.
例如:
说我正在one.myserver.com上执行以下代码,这是为了删除two.myserver.com上的cookie
say I am executing the following code on one.myserver.com, which is meant to delete a cookie on two.myserver.com
setcookie("ACOOKIE", 0, time() - 3600, "/", "two.myserver.com");
目前,这种方式对我不起作用.我有什么办法可以使像这样的东西工作?
Currently doing it this way is not working for me. Is there any way I could get something like this to work?
推荐答案
不,您只能从其他子域中进行操作.
Nope, you can only do that from the other subdomain.
这篇关于删除其他子域中的Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文