|
首先我是小菜鸟,这个问题可能是哪里没设好所遭成的!
怀着兴奋的心情,下了个新版2.0试用,刚按教程编了一个简单例子
(是按上面操作的http://www.ibm.com/developerworks/cn/web/wa-codeigniter/index.html)
页面出来,心情激动,但是当提交,就显示
Fatal error: Class 'Model' not found in E:\xampp\htdocs\cg88\application\models\mcontacts.php on line 8
(本地环境是xammp1.7)
mcontacts.php 如下:
<?php
class MContacts extends Model{
function MContacts(){
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')),
'notes' => $this->input->xss_clean($this->input->post('notes')),
'ipaddress' => $this->input->ip_address(),
'stamp' => $now
);
$this->db->insert('contacts', $data);
}
}
?>
经过一番查错,对照,还是没找到问题根源,百度,谷歌就找到一个类似的先例,还是也没解救的方法,,
http://codeigniter.org.cn/forums ... tid=4268&page=1
无奈之下,我还是用旧的版本,1.73,旧版本就没有出错,,不知为什么,,跪求![](static/image/smiley/default/cry.gif) |
|