2013-07-23 123 views
0

我想弄清楚为什么登录控制器不会加载名为user_model的用户模块模型。我还包括了文件结构。我想指出我在我的应用程序中使用了Jamie Rumbelow的MY_Model。 https://github.com/jamierumbelow/codeigniter-base-model无法加载模块模型文件

<?php 

if (! defined('BASEPATH')) exit('No direct script access allowed'); 

class Login extends Backend_Controller 
{ 
    public function __construct() 
    { 
     parent::__construct(); 
     $this->load->model('user/user_model', 'user'); 
    } 
} 

<?php 

class User_model extends MY_Model 
{  
    public function __construct() 
    { 
     parent::__construct(); 
    } 
} 

-application 
    -modules 
     -user 
      -controllers 
       login.php 
      -models 
       user_model.php 
+0

你已经在某处定义了'MY_Model',对吗? –

+0

尝试像这样$ this-> load-> model('user/user_model'); –

+0

这不起作用。看看我的编辑。 – user2576961

回答

0

我能够通过添加一种推广上,我已经错过了文件名来解决这个问题。