HMVC, Cant Load Libraries - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: HMVC, Cant Load Libraries (/showthread.php?tid=53440) |
HMVC, Cant Load Libraries - El Forum - 07-24-2012 [eluser]seminalJim[/eluser] Im having trouble loading libraries in codeigniter (2.1.2), with HMVC installed... Ive tried setting the autoload (/config/autoload.php) and can use the db class in (controllers/articles.php)... Code: $this->db->get('articles'); However, I cant use the db class from a module controller, eg. modules/MOD_Content/controllers/Content.php/fetch($id) Code: $this->load->model('MOD_Content/content_model'); Code: class Content_Model extends CI_Model I get this message... Code: A PHP Error was encountered I traced the snapsemenu bit to my controller (controllers/articles.php) Code: class Articles extends MX_Controller If i comment-out the line Code: echo Modules::run('MOD_SnapseMenu/SnapseMenu/render'); It seems to work for some reason? I am totally mystified? Please somebody help? HMVC, Cant Load Libraries - El Forum - 07-24-2012 [eluser]Aken[/eluser] Well that should tell you that the problem is not with the code you've posted, but with something to do with the SnapseMenu module. HMVC, Cant Load Libraries - El Forum - 07-25-2012 [eluser]seminalJim[/eluser] Snapsemenu doesnt do anything really...? Controller: snapsemenu.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); View: output.php Code: <style> And it doesnt use the DB class? HMVC, Cant Load Libraries - El Forum - 07-25-2012 [eluser]seminalJim[/eluser] Shit, sorry... lol. you were right. I had to change the CI_ to MX_ Thanks for your help! |