codeigniter无法加载库

oll*_*lla 4 load controller codeigniter

我有一个问题,我无法在我的控制器中加载我的库:S

我收到此错误:消息:未定义属性:Profil :: $ profileWall

我的图书馆:

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

class ProfileWall
{

    private $CI;

    public function __construct()
    {
        $this->CI =& get_instance();
    }

    public function wallShow()
    {
        $this->CI->load->model('profil_model');
        return $this->CI->profil_model->wallGet($this->CI->uri->segment(3));
    }
}
Run Code Online (Sandbox Code Playgroud)

和我的控制器

    function index()
    {
        $this->load->model('profil_model');
        $data['query'] = $this->profil_model->vis_profil($this->uri->segment(3)); 


        //Henter lib profilwall så man kan vise wall beskeder i profilen
        $this->load->library('profileWall');
        $data['queryWall'] = $this->profileWall->wallShow();



        $data['content'] = 'profil_view';
        $this->load->view('includes/template', $data);


}
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

jon*_*ohn 26

确保您的库加载始终以小写形式完成,根据文档,对象实例将始终为小写.

还要确保您的库文件大写 ProfileWall.php

示例加载 $this->load->library('profilewall');

用法 $this->profilewall->function();