HMVC问题。无法加载控制器或型号

时间:2015-04-09 06:10:49

标签: angularjs html5 codeigniter hmvc

不好意思,因为我的英语不好。

我正在使用角度js和codeigniter处理Web应用程序,使用第三方库作为HMVC(github)和用于angularjs的Ui路由器。我安装了HMVC库,如我主项目中的多个youtube tutos所示,但我无法让它们工作。

问题是我无法在模块文件夹或子文件夹中加载控制器或模型。在开始时我认为这是由于我的项目中的一些路线,所以我决定尝试HMVC全新安装。找到了这个教程,跟着它>> https://www.youtube.com/watch?v=wDqwXpEQ8Pc<<相同的结果既没有加载模型或控件。

我试过

< $config['modules_locations'] = array(
APPPATH.'modules/' => '../modules/', );

将路径和模块文件夹更改为Web根目录,更改“modules_location”。一切似乎都有效

我将控制器类扩展为MX_Controller - &gt;我发现其他一些stackoverflow解决方案,因为它没有正确扩展。

我只能在codeigniter默认文件夹上调用Controllers On&gt; application&gt;控制器。但我无法在&gt;应用程序&gt;模型中加载模型。显示错误如下:“无法找到您指定的模型:xxModel”

无法在&gt;应用程序&gt;模块&gt; xx&gt;控制器&gt; xxController内加载控制器。

我的.Htaccess文件:

<IfModule mod_rewrite.c>
RewriteEngine On

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

我的文件夹如下所示:

    • 系统
    • 应用
      • 控制器 - &gt; (仅在此处加载默认控制器)
      • 模型 - &gt; (未找到从上述控制器加载的型号)
      • modules - &gt; (不从这里加载控制器)
    • 模块 - &gt; (应该在这里)
      • 模块
        • 控制器。
    • Html - &gt; (views文件夹,可以从Application&gt;控制器中的控制器加载视图)。

请帮忙!谢谢。如有必要,请告诉我更多信息。

0 个答案:

没有答案