CI_session 未在 Mozilla Firefox 中保存
CI_session is not saving in Mozilla Firefox
我的系统在使用 Mozilla Firefox 时无法登录。
我尝试在不需要会话的情况下登录,并成功进入我的系统。我认为 Mozilla 没有保存会话。有什么想法吗?
public function login_user(){
$data = array(
'name' => $this->input->post('name'),
'pass' => $this->input->post('pass')
);
if($data['name'] == 'test' and $data['pass'] == 'test' ){
$this->session->set_userdata('user_name','test');
return redirect('cicrud/Post');
} else {
return redirect('cicrud/login');
}
}
请参考此代码
并在您的视图文件中键入此代码,并检查 'Test' 输出中是否显示
$this->session->userdata('user_name')
这不是 Mozilla Firefox 浏览器的问题。
能否请您分享您的代码然后我们检查是什么问题。
我的系统在使用 Mozilla Firefox 时无法登录。 我尝试在不需要会话的情况下登录,并成功进入我的系统。我认为 Mozilla 没有保存会话。有什么想法吗?
public function login_user(){
$data = array(
'name' => $this->input->post('name'),
'pass' => $this->input->post('pass')
);
if($data['name'] == 'test' and $data['pass'] == 'test' ){
$this->session->set_userdata('user_name','test');
return redirect('cicrud/Post');
} else {
return redirect('cicrud/login');
}
}
请参考此代码
并在您的视图文件中键入此代码,并检查 'Test' 输出中是否显示
$this->session->userdata('user_name')
这不是 Mozilla Firefox 浏览器的问题。 能否请您分享您的代码然后我们检查是什么问题。