dqtok88424 2013-07-23 20:20
浏览 55
已采纳

无法加载模块模型文件

I'm trying to figure out why the login controller won't load the user module model called user_model. I have also included the file structure. Id' like to point out I am using Jamie Rumbelow's MY_Model in my application found here. 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
  • 写回答

1条回答 默认 最新

  • dongpan3001 2013-07-23 21:11
    关注

    I was able to solve the problem by adding an extention onto the file name which I had missed.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改