我使用 WireDesignz HMVC 运行 CodeIgniter 3.0.6。
跑步时
modules::load('page/com_Page')->_GetPage();
我上网
Call to a member function _GetPage() on null
但在本地它正在工作。目录结构如下
application
public_html
public_html/components
public_html/components/page
public_html/components/page/controllers/com_Page
system
在我的配置中
$document_root = $_SERVER['DOCUMENT_ROOT'];
$document_root_exploded = explode('/', $document_root);
$document_root_name = end($document_root_exploded);
$config['modules_locations'] = array(
APPPATH . '../' . $document_root_name . '/components/' => '../../' . $document_root_name . '/components/',
);
我不知道为什么本地(Windows Apache)它的工作和在线不是(Linux)。