本帖最后由 貝殼 于 2012-5-29 21:47 编辑
A PHP Error was encountered
Severity: Notice
Message: Undefined property: User:db
Filename: libraries/Form_validation.php
Line Number: 954
Fatal error: Call to a member function limit() on a non-object in C:\Users\WuChen\Desktop\8.5\root\system\libraries\Form_validation.php on line 954
部分代码:
PHP复制代码
public function form_register ()
{
$this->load->helper(array('form', 'url'));
$this->load->library('form_validation');
/*
@Shellknow
@FormChecker
@set rule
*/
$this->form_validation->set_rules('username', 'Username', 'required|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'required|xss_clean');
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|is_unique[users.email]|xss_clean');
/**
@Shellknow
@FormChecker
@set rule
*/
$this->output->enable_profiler(TRUE);
$data['realname']=$this->data_title_index;
$data['title']=$this->data_title_success;
$data['description']=$this->data_description;
$data['more']=$this->data_more;
$msg['success']=$this->msg_register_success;
if ($this->form_validation->run() == FALSE)
{
$this->load->view('header_view',$data);
$this->load->view('register_view');
$this->load->view('footer_view');
}
else
{
$this->load->view('header_view',$data);
$this->load->view('messageSuccess_view',$msg);
$this->load->view('footer_view');
}
}
复制代码 |