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

刪除 cookie 時出現問題,不會取消設置

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

問題描述

我已經嘗試在 php 手冊和互聯網上搜索有關如何刪除 cookie 的內容,并且我已經按照他們所說的完全相同的方式進行了嘗試:

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);

但是當我在 Firefox 的 cookie 對話框中檢查 cookie 時,它??仍然具有相同的值.我使用以下行設置此 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 上發現了這個問題:,但沒有一個答案解決了問題.我也試過把所有參數都放進去,就像作者說的那樣,但沒有效果.

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.

有人看到問題了嗎?

推薦答案

手冊說明:

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

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 被正確指定——刪除它時也是如此.例如,如果 cookie 是在子目錄中指定的,您可能無法從父目錄或子目錄(或兩者)中刪除它.

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).

我不完全確定權限是如何工作的,但您可能希望使用 Web 開發人員工具欄查看您嘗試刪除的 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.

這篇關于刪除 cookie 時出現問題,不會取消設置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
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 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 特a毛片| 欧美日一区 | 99精品在线 | 久久久国产精品入口麻豆 | 午夜电影网站 | 国产成人精品a视频一区www | 亚洲一区二区免费视频 | 久久久久久成人网 | 91在线观看| 国产精品美女www | 欧美一区视频 | 欧美在线资源 | 久久久黑人| 欧美视频三区 | 欧美日韩精品影院 | 人人草天天草 | 性高湖久久久久久久久3小时 | 二区在线视频 | 亚洲一区二区三区视频在线 | 资源首页二三区 | 欧美一区免费 | 欧美一区二区免费视频 | 精品综合在线 | 99视频免费播放 | 超碰天天| 欧美a级成人淫片免费看 | 亚洲精品在线视频 | 国产精品视频一二三区 | 精品一区二区观看 | 日韩电影一区 | 国产一区二区三区色淫影院 | 一级黄色片在线免费观看 | 国产在线精品一区二区三区 | 欧美精品一区二区三区一线天视频 | 欧美在线a | 天天艹日日干 | 午夜精品久久久久久久久久久久久 | 一区二区三区四区在线播放 | 国产精品一区久久久久 | 国产一区二区三区视频在线观看 | 色婷婷久久久久swag精品 |