How to clear session of all users?

后端 未结 2 1829
说谎
说谎 2021-01-20 17:35

I using php sessions in my project,i updated code:added some values to session.now i need to clear all existing sessions

ps.my OS is ubuntu 9.04

2条回答
  •  执笔经年
    2021-01-20 18:05

    If there were a file included/required in all your files, you could put migration logic in there.

    if (unset($_SESSION['myvar']) {
      $_SESSION['myvar'] = my_setup_myvar_func();
    }
    

    My main PHP application has such a file, but YMMV.

提交回复
热议问题