public function get_user_id(){ $user_id=$_POST['user_id'];//用户id //domain('xldios.zhekd.com'); //session(array('name'=>'user_id','domain'=>'xldios.zhekd.com','path'=>'/home/session/')); session('user_id',"$user_id"); $text="userid=".$user_id."session=".session('user_id')."sessi目录".session_save_path(); $this->logger($text); }
In the above method, the value can be retrieved immediately after the session is assigned.
But in the same controller, the other methods are not taken.
What's going on
Reply content:
public function get_user_id(){ $user_id=$_POST['user_id'];//用户id //domain('xldios.zhekd.com'); //session(array('name'=>'user_id','domain'=>'xldios.zhekd.com','path'=>'/home/session/')); session('user_id',"$user_id"); $text="userid=".$user_id."session=".session('user_id')."sessi目录".session_save_path(); $this->logger($text); }
In the above method, the value can be retrieved immediately after the session is assigned.
But in the same controller, the other methods are not taken.
What's going on
session('user_id')
So you can get it, what's the problem?
Is this method executed before the other methods in the controller are called?
The code is not affixed to the whole, not clear.