Questions about the session
Premise:
Scripting language: php/server: Linux
Server-side use a $_session["login"] and $_session["username"] to record whether the user login and user name
The problem is as follows:
A1/A2 refers to the newly opened Browse window ( Note: Is the newly opened window, not the label)
Scenario 1: A user logged in to the browser A1 on PC A but did not exit. Set $_session["Login"] = "true"; $_session["username"] = "A";
At this time the browser A2 on Computer A has an identical or different user exit. Set $_session["Login"] = "false" and unset ($_session["username"])
Question 1: What is the value of the browser A1 user's $_session["login" on computer A? is the value of $_session["username" still in?
Scenario 2: There is a user logged on in the browser on PC A, but not exited. Set $_session["Login"] = "true"; $_session["username"] = "A";
At this point the browser on computer B has an identical or different user exit. Set $_session["Login"] = "false" and unset ($_session["username"])
2: What is the value of $_session["login" for the browser on computer A? is the value of $_session["username" still in?
Question 3: The above problem is that the server side only with a session key also records the value, the different client will not operate on the other client impact.
100 points online and other answers
Thank you!
Share to: more
------Solution--------------------
Each independent browser process will produce a session key
Note: Multi-tab browsers count only one process
Other questions, you'll know when you move.
------Solution--------------------
You can think that a browser can only log on to a user, log in or out of a tab or window, refresh another window will also sync