我正在使用角度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>
我的文件夹如下所示:
请帮忙!谢谢。如有必要,请告诉我更多信息。