Allow php sessions to carry over to subdomains

前端 未结 10 1102
清歌不尽
清歌不尽 2020-11-22 01:10

I use php sessions (not cookies, except for session id cookie) for all user data, and when a user goes to their profile user.mydomain.com they are immediately \"logged out\"

10条回答
  •  隐瞒了意图╮
    2020-11-22 02:15

    Another option that worked for me: is to force the name of the session:

    session_name("myWebsite");
    session_start(); 
    

提交回复
热议问题