What happens if session name is same on two different websites?

后端 未结 7 1046
渐次进展
渐次进展 2021-01-13 07:23

I have a two diff. project on my XAMPP say it is Project1 and Project2.
When i login with Project1, i check authentic

相关标签:
7条回答
  • 2021-01-13 08:24

    So suppose the server is sharing then what should I do to prevent it?

    To answer your follow up question. You can simply name your session on a specific website using session_name() before your session_start().

    session_name('PROJECT1');
    session_start();
    

    this one-liner should do it.

    0 讨论(0)
提交回复
热议问题