delete cookie in php

前端 未结 5 898
心在旅途
心在旅途 2021-01-28 06:01

I am trying to delete a cookie.

I am using setcookie(\"PHPSESSID\", \"\", time() - 6400); which deletes the cookie just fine.

However it is not enti

5条回答
  •  半阙折子戏
    2021-01-28 06:20

    You might want to unset the $_COOKIE variable too, by adding a

    unset($_COOKIE['PHPSESSID']);
    

    in the next line. That however just affects the currently loaded page.

提交回复
热议问题