How do I delete PHPSESSID on client computers

前端 未结 13 1652
滥情空心
滥情空心 2020-12-30 22:50

UPDATE ON THE PROBLEM:

  • On some browsers, we have two PHPSESSIDs.
  • One PHPSESSID is not set by me anywhere in my script
  • It has
13条回答
  •  误落风尘
    2020-12-30 23:28

    It is mentioned here, though Use of session_register() is deprecated and Use of $_SESSION is preferred : -

    If session_start() was not called before this function is called, an implicit call to session_start() with no parameters will be made. $_SESSION does not mimic this behavior and requires session_start() before use.

    Then, using $_SESSION , append a JSON file with Auth=True, with TimeOut=20 minutes.
    Whenever, user logs out or after timeout, set Auth=False. Then, read that JSON file using PHP and

    Then, if Auth=False, create JS using PHP that OnLoad event, document.cookie = 'PHPSESSID' + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';

提交回复
热议问题