https://github.com/lawrence08...
Because I think this is more convenient and understandable, I wanted to use this, but there was a problem when it came to verification, so I used the login interface
public function login() {
//print_r($_POST);
$this->form_validation->set_rules('username', '用户名', 'required');
$this->form_validation->set_rules('password', '密码', 'required');
if ($this->form_validation->run()) {
$username = $this->input->post('username');
$password = $this->input->post('password');
$data['username'] = $username;
$data['password'] = $password;
$user = $this->i2active_user->get_user_by_name($username);
if ($user) {
if ($password == $user->password) {
$this->session->set_userdata('username', $user->name);
redirect('user_list');
} else {
$this->data['login_error'] = '用户名密码错误';
}
} else {
$this->data['login_error'] = '用户不存在';
}
}
$this->load->view('login', $this->data);
}
Remove the $this->form_validation->run() section and there will be no problem
Why is this
Can you recommend what kind of internationalization you use, thank you
You can take a look at the official multi-language package
https://github.com/bcit-ci/co...