Using the ThinkPHP3.1.3 version of the session, multiple projects at the same time debugging will make one-dimensional array of the session is not enough, resulting in a project login background, the B project will not have to login backstage to enter the background operation.
The problem is that they all call the same session file SESS_D55A5F55DB022FB119FC38193C4CECAC. I don't know how to define how this file is named. However, I found a way to solve multiple projects that share the same session but do not conflict with each other. The principle of this method is to change the session into a two-dimensional array. The specific action is to add the session prefix in the configuration file (preferably named sess+ project name)
1 // Session prefix 2 ' Session_prefix '= ' and'mysessa',
Then using the two-dimensional session
Take value
1 $_session[c ('session_prefix') ['uid'];
The corresponding exit login
1 Public function Loginout () {2 $_session[c ('session_prefix')]=null ; 3 $this->redirect (group_name.' /login/index ' ); 4 }
thinkphp: Multiple projects share the same session problem