这是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
答案 0 :(得分:0)
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads?tab=downloads中的错误。他们还在解决。我等着离开新版HMVC。对于ci 3.1.3与HMVC不兼容。