☆淡定★ 发表于 2011-7-7 20:56:17

载入模块 出错 貌似没有载入

model文件夹里user_mdl.php 里面写了
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class User_mdl extends Ci_Model {

        public function get_user_by_id($uid)

        {

                echo '21222';

        }


}

controllers 下的user。php文件
<?php

class User extends CI_Controller {

       

        function __construct()
        {

                parent::__construct();

                $this->lang->load('common');

        }

       

        public function index()

        {
                echo '1111';
                $this->load->model('user_mdl');

                $new_data = $this->user_mdl->get_user_by_id('1');
                echo 'jkjlh';

        }       

}

只输出了   1111其他什么都没有 哪里错了啊??

☆淡定★ 发表于 2011-7-7 20:59:35

顶上去

binbin 发表于 2011-7-7 21:44:48

你的Ci_model写成CI_model试试

☆淡定★ 发表于 2011-7-8 21:11:35

binbin 发表于 2011-7-7 21:44 static/image/common/back.gif
你的Ci_model写成CI_model试试

好了 谢谢啊
页: [1]
查看完整版本: 载入模块 出错 貌似没有载入