codeigniter - ci i18n I found a packaged file on github, but it seems to conflict with the form_validation function. Please take a look.
某草草
某草草 2017-05-16 16:43:29
0
1
481

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

某草草
某草草

reply all (1)
漂亮男人

You can take a look at the official multi-language package
https://github.com/bcit-ci/co...

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!