delete cookie in php

前端 未结 5 856
心在旅途
心在旅途 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:13

    See Example 1 here to delete and destroy a session:

    http://php.net/manual/en/function.session-destroy.php

    first unset the cookie, then destroy the session.

提交回复
热议问题