小编oll*_*lla的帖子

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)

我究竟做错了什么?

load controller codeigniter

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

codeigniter ×1

controller ×1

load ×1