public function index()
{
$resource=$this->get_captcha();//****************************************获得验证码图片资源
$data['img']=$resource;
$this->load->view('admin/admin_login.html',$data);
}
public function sign_in()
{
$this->form_validation->set_rules('account', 'Username', 'required'); //设置表单验证规则
$this->form_validation->set_rules('password', 'Password', 'required');
$this->form_validation->set_rules('captcha','Captcha','required');
if ($this->form_validation->run() == FALSE) ///表单验证不允许为空
{
$this->index();
}
}