我在codeigniter hmvc 3.1.3中遇到错误

时间:2017-01-13 19:43:00

标签: codeigniter-hmvc

这是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

1 个答案:

答案 0 :(得分:0)

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