要是代码有错就迷茫了.因为不在config中配置后缀的话,是一切正常的.也附上关键代码吧
function loginin()
{
$this->form_validation->set_message('required', '请输入%s');
$this->form_validation->set_message('checklogin', '用户或%s不正确,请重新输入');
$this->form_validation->set_message('checkVcode', '验证码输入不正确');
$this->form_validation->set_rules('username','用户名','required');
$this->form_validation->set_rules('password','密码','required|callback_checklogin');
$this->form_validation->set_rules('vcode','验证码','required|callback_checkVcode');
if($this->form_validation->run()==false)
{
$this->load->view('admin/login');
}
else
{
$username = $this->input->post('username',TRUE);
$this->Mod_admin->editLoginStatus($username);
$this->load->library('session');
$this->session->set_userdata('admin',$username);
$this->session->set_userdata('IsAuthorized','true');
redirect('admin');
}
}
不配置后缀的时候.一切正常,配置后缀了的话,地址跳到index.php/admin.html,浏览器提示找不到该url. |