|
本帖最后由 stmadman 于 2009-11-30 23:17 编辑
控制器代码:
class Members extends Controller {
function Members()
{
parent::Controller();
}
function register()
{
$this->load->model('Members');
$row = $this->Members->getusername();
$this->load->view('members/index.php',$row);
}
}
模型代码:
class Members extends Model {
function Members()
{
parent::Model();
}
function getusername()
{
$this->load->database();
$query = $this->db->get('members');
return $query->result();
}
}
错误:
Fatal error: Cannot redeclare class Members in D:\AppServ\www\ci\system\application\models\members.php on line 25 |
|