HMVC issue |
Hello,
I've been using Codeigniter for a while now and i want to introduce modules to my app. I've downloaded wiredesignz latest extension ( supposed to support CI 3.x ) and i've been having trouble getting it to work. I setup a controller named "Home" in my application/controllers folder. Code: <?php Created a module with the below structure And this is the modules controller class Test Code: <?php When i run the URL in the browser all i get is the below "ok here we go " which is outputted by the Home controller. What am i doing wrong ?
Your class Test should extend MX_Controller:
PHP Code: class Test extends MX_Controller{ (10-22-2015, 11:16 AM)davicotico Wrote: Your class Test should extend MX_Controller: Changed that and still now luck. If i try Code: $this->load->module('test'); Code: Message: Call to a member function sayhello() on a non-object Now just to clarify the controller i'm trying to call the modules controller is located in "applications/controllers" not in another modules controllers.
Hi!
Maybe you can take a look at my approach of HMVC in CodeIgniter http://forum.codeigniter.com/thread-63078.html (10-22-2015, 03:45 PM)Martin7483 Wrote: Hi! Hello, I downloaded your application and any ideas why i might be getting Code: Message: Call to undefined function set_realpath() Codeigniter version is 3.0.02
(10-23-2015, 12:43 AM)Sentro Wrote:(10-22-2015, 03:45 PM)Martin7483 Wrote: Hi! Sorry about that. You need to load the path helper. I auto load it in my auto load config file and recommend you do this when using the Simple HMVC PHP Code: $this->load->helper('path'); (10-23-2015, 12:54 AM)Martin7483 Wrote:(10-23-2015, 12:43 AM)Sentro Wrote:(10-22-2015, 03:45 PM)Martin7483 Wrote: Hi! Thank you, works like a charm. Actually there is also another function in system/helpers/path_helper I'll get right into since i need something like it ASAP. Thank you for this.
(10-23-2015, 01:03 AM)Sentro Wrote: Thank you, works like a charm. Actually there is also another function in system/helpers/path_helper Yes, that is the original CI set_realpath. Only the original throws an error when a file or directory does not exist. I wanted it to return FALSE when testing failed. Hope it will help you out. Any improvements or suggestions or most welcome |
Welcome Guest, Not a member yet? Register Sign In |