|
楼主 |
发表于 2010-12-29 14:19:49
|
显示全部楼层
修改后的错误:
class Mcontact extends Model { function Mcontact() { parent::Model(); } function addContact() { $now = date("Y-m-d H:i:s"); $data = array( "name" => $this->input->xss_clean($this->input->post('name')), "email" => $this->input->xss_clean($this->input->post('email')), "ipaddress" => $this->input->ip_address(), "rgdate" => $now ); $this->db->insert('contacts',$data); } }
Fatal error: Class 'Mcontact' not found in D:\workspace\CodeIgniter\system\libraries\Loader.php on line 180
修改后的代码:
class Mcontact extends Model {
function Mcontact() {
parent::Model();
}
function addContact() {
$now = date("Y-m-d H:i:s");
$data = array(
"name" => $this->input->xss_clean($this->input->post('name')),
"email" => $this->input->xss_clean($this->input->post('email')),
"ipaddress" => $this->input->ip_address(),
"rgdate" => $now
);
$this->db->insert('contacts',$data);
}
} |
|