PHP Session ID changing on every request

前端 未结 7 1905
终归单人心
终归单人心 2020-12-06 17:46

I have just migrated my application from a local WAMP to the actual online server. This has caused trouble with the session ID not being saved as it appears.

  • I
7条回答
  •  庸人自扰
    2020-12-06 18:25

    You must have to write session_start(); before accessing any session variables, without it you will not able to access the session variables.

    Try to put session_start() on the very first line of the file.

提交回复
热议问题