Warning: session_destroy(): Trying to destroy uninitialized session

后端 未结 6 681
孤独总比滥情好
孤独总比滥情好 2020-12-17 16:42

my class.inc file:



        
6条回答
  •  臣服心动
    2020-12-17 17:36

    You have to call the function mentioned below at the top your logout function in the logout class.

    session_start();
    

    Add the above function and try it out. If you don’t start the session at the top of your file, it will throw exceptions like “headers already sent”, “can’t start the session”, etc.

提交回复
热议问题