1

我使用 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)。

4

1 回答 1

0

它与区分大小写有关。在 HMVC 中,控制器必须以大写字母开头。

于 2016-04-18T10:53:46.650 回答