0

这是MY_Controller

class MY_Controller extends MX_Controller {
    function __construct()
    {
        parent::__construct();
        $this->load->module('Template');
    }
} 

这是Home控制器:

class Home extends MY_Controller {
    function __construct()
    {
        parent::__construct();
    }


    function index()
    {
        $data['content_view'] = 'home/home_v';
        $this->template->sample_template($data);
    }

    function about()
    {
        $data['content_view'] = 'home/about_v';
        $this->template->sample_template($data);
    }
}

然后制作:

~~~~~~~~~~~~~~~
Severity: Notice
Message: Undefined property: CI::$template
Filename: MX/Controller.php
Line Number: 59
4

1 回答 1

0

https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads?tab=downloads中的错误。他们还在解决。我正在等待离开新版本的 HMVC。对于 ci 3.1.3 与 HMVC 不兼容。

于 2017-01-16T13:14:14.193 回答