Reputation: 360
Iam trying to switch to hmvc in codeigniter. I will explain my issue from scratch itself. First I downloaded Codeignter 3.0 version from http://www.codeigniter.com/download and when I check my browser it is showing the welcome message of CI. Now to add hmvc structure I downloaded the hmvc modular extension from https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads. And placed the core and third party modules inside my CI folder. Then I created a Folder inside the application folder and named it as modules. Within modules I created a folder say test. I have a controller folder which contain test.php.
class Test extends MY_Controller {
public function index()
{
echo "hey my first module is ready";
}
}
But when i call the module in the url like localhost/index.php/test i got a page not found error. Am i missing any configuration? I got all other controller working well before i switched to hmvc. How can i fix this. Thanks in advance.
Upvotes: 1
Views: 2391
Reputation: 116
Try to follow this tutorial.Here you will get ready to use HMVC folder. http://www.darwinbiler.com/ready-to-use-codeigniter-modular-extensions-hmvc/
Upvotes: 0
Reputation: 592
Do you forget this piece of code in your config file?
$config['modules_locations'] = array(
APPPATH.'modules/' => '../modules/',
);
Do you created your own Controller? Cause you extends MY_Controller
.
If not, extend CI_Controller
or MX_Controller
For more information read the documentation at wiredesignz's HMVC for Codeigniter
Kind regards
Upvotes: 4