久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

刪除 cookie 時(shí)出現(xiàn)問題,不會(huì)取消設(shè)置

Problems deleting cookies, won#39;t unset(刪除 cookie 時(shí)出現(xiàn)問題,不會(huì)取消設(shè)置)
本文介紹了刪除 cookie 時(shí)出現(xiàn)問題,不會(huì)取消設(shè)置的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我已經(jīng)嘗試在 php 手冊(cè)和互聯(lián)網(wǎng)上搜索有關(guān)如何刪除 cookie 的內(nèi)容,并且我已經(jīng)按照他們所說的完全相同的方式進(jìn)行了嘗試:

I've tried searching the php manual and internet on how to delete cookies and I've tried it the exact same way they all say:

setcookie("name", '', 1);

setcookie("name", '', time()-3600);

但是當(dāng)我在 Firefox 的 cookie 對(duì)話框中檢查 cookie 時(shí),它??仍然具有相同的值.我使用以下行設(shè)置此 cookie:

But when I check the cookies in the cookies dialog in Firefox, it's still there with the same value. I set this cookie using the following line:

setcookie("name", $value, time() + 259200, $path);

我在 stackoverflow 上發(fā)現(xiàn)了這個(gè)問題:,但沒有一個(gè)答案解決了問題.我也試過把所有參數(shù)都放進(jìn)去,就像作者說的那樣,但沒有效果.

I found this question on stackoverflow: , but none of the answers solved the problem. I also tried putting all paramaters in, like the author said, but it had no effect.

有人看到問題了嗎?

推薦答案

手冊(cè)說明:

必須使用與設(shè)置時(shí)相同的參數(shù)來刪除 Cookie.如果 value 參數(shù)是一個(gè)空字符串,或者 FALSE,并且所有其他參數(shù)都與之前對(duì) setcookie 的調(diào)用匹配,那么具有指定名稱的 cookie 將從遠(yuǎn)程客戶端中刪除.這是通過將值設(shè)置為已刪除"并將過期時(shí)間設(shè)置為過去一年來在內(nèi)部實(shí)現(xiàn)的.

Cookies must be deleted with the same parameters as they were set with. If the value argument is an empty string, or FALSE, and all other arguments match a previous call to setcookie, then the cookie with the specified name will be deleted from the remote client. This is internally achieved by setting value to 'deleted' and expiration time to one year in past.

所以還要確保 $path 被正確指定——刪除它時(shí)也是如此.例如,如果 cookie 是在子目錄中指定的,您可能無(wú)法從父目錄或子目錄(或兩者)中刪除它.

So also make sure that $path is specified correctly -- also when deleting it. For instance, if the cookie was specified in a subdirectory, you may not be able to delete it from either the parent or children directories (or both).

我不完全確定權(quán)限是如何工作的,但您可能希望使用 Web 開發(fā)人員工具欄查看您嘗試刪除的 cookie 的路徑.

I'm not entirely sure how the permissions work, but you might want to use the Web Developer Toolbar to view what the path is of the cookie you are attempting to delete.

這篇關(guān)于刪除 cookie 時(shí)出現(xiàn)問題,不會(huì)取消設(shè)置的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個(gè)表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動(dòng)填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產(chǎn)生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 91影片| 欧美黑人激情 | 欧美不卡视频一区发布 | 亚洲精品91 | 精品国产18久久久久久二百 | 成人片免费看 | 一区二区三区在线 | 亚洲国产成人av好男人在线观看 | 欧美簧片| 久久9久 | 日韩在线看片 | 国产精品亚洲第一区在线暖暖韩国 | 日韩国产精品一区二区三区 | 国产999精品久久久 精品三级在线观看 | 欧美一区二区三区小说 | 亚洲在线观看视频 | 一区二区av | 国产精品久久久久久久久久久久 | 久久精品视频网站 | 精品毛片 | 狠狠做六月爱婷婷综合aⅴ 国产精品视频网 | 中文字幕一区二区三区四区五区 | 亚洲成人一区 | 亚洲www啪成人一区二区 | 精品视频一区二区三区在线观看 | 日本高清视频在线播放 | 四色永久 | 男女羞羞视频在线观看 | 青青草在线播放 | 天天躁日日躁狠狠躁白人 | 免费一级黄色录像 | 免费视频二区 | 国产精品网页 | 久久久天天| 日本久久综合 | 国产一在线 | 久久1区| 国产视频一区二区在线观看 | 久久一久久 | 亚洲精品区 | 巨大荫蒂视频欧美另类大 |