codeigniter-hmvc

Unable to load libraries when using CI 3 with HMVC

微笑、不失礼 提交于 2020-02-02 06:26:04
问题 I started a Modular project in CI2 (using HMVC). I am moving the project to CI 3. I am trying to autoload the session library using config/autoload .php $autoload['libraries'] = array('database','session'); I get this error: Fatal error: Call to undefined method MY_Loader::_ci_load_class() in /srv/www/htdocs/projects/application/third_party/MX/Loader.php on line 158 Even if a manually load the library within the controller using $this->load->library('session'), i get the same error. I am

Unable to load libraries when using CI 3 with HMVC

烂漫一生 提交于 2020-02-02 06:25:46
问题 I started a Modular project in CI2 (using HMVC). I am moving the project to CI 3. I am trying to autoload the session library using config/autoload .php $autoload['libraries'] = array('database','session'); I get this error: Fatal error: Call to undefined method MY_Loader::_ci_load_class() in /srv/www/htdocs/projects/application/third_party/MX/Loader.php on line 158 Even if a manually load the library within the controller using $this->load->library('session'), i get the same error. I am

Unable to load libraries when using CI 3 with HMVC

╄→гoц情女王★ 提交于 2020-02-02 06:25:25
问题 I started a Modular project in CI2 (using HMVC). I am moving the project to CI 3. I am trying to autoload the session library using config/autoload .php $autoload['libraries'] = array('database','session'); I get this error: Fatal error: Call to undefined method MY_Loader::_ci_load_class() in /srv/www/htdocs/projects/application/third_party/MX/Loader.php on line 158 Even if a manually load the library within the controller using $this->load->library('session'), i get the same error. I am

Codeigniter Model Fatal error: Using $this when not in object context

心已入冬 提交于 2019-12-25 15:23:30
问题 I have a little issue with some code that works on development but not on production. It is weird, because all the other code works (or seems to). The entire error is the following: Fatal error: Using $this when not in object context in /[snip]/application/modules/manage_plugins/models/Manage_plugins.php on line 6 A PHP Error was encountered Severity: Error Message: Using $this when not in object context Filename: models/Manage_plugins.php Line Number: 6 Backtrace: From the other similar

How to route URIs to application/controllers & still use Module::run in CI3 with HMVC

◇◆丶佛笑我妖孽 提交于 2019-12-24 05:48:38
问题 I only use the modules for partial views, they are never routed to directly. Instead I have main controllers inside application/controllers and views inside application/views/ which execute Modules::run($moduleName, $params); This invokes the module and renders fine, when reached. The problem is none of my routes are calling their application/controller/ methods . Meaning my routing has stopped working entirely and only the homepage defined by my route['default_controller'] works. Because my

code igniter Modular Extensions - Access level to MX_Router::_set_default_controller() must be public (as in class CI_Router)

岁酱吖の 提交于 2019-12-20 01:41:14
问题 I get the popular Modular Extensions - HMVC installed from https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc and set it up with codeigniter 2.2.2 BUT when everything should be working fine, I get this error Access level to MX_Router::_set_default_controller() must be public (as in class CI_Router) in C:..\application\third_party\MX\Router.php on line 241 回答1: Solution 1 I had to change several methods visibility in Router.php , so I changed the following methods from

HMVC codeigniter works on local server but not on web server

左心房为你撑大大i 提交于 2019-12-19 10:06:47
问题 this is killing me what do i have? CI version: 2.1.4 Modular Extensions - HMVC by wiredesignz a basic codeigniter(hmvc) project that works fine with the setting it has in local server(mamp) with php 5.5.3 my problem after i move the project to public web server i changed the following things. ——application/config/config.php $config['base_url'] = 'http://example.com/'; ——application/config/database.php $db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'newdbusername'; $db[

Create modules inside a module in CodeIgniter

点点圈 提交于 2019-12-11 14:39:31
问题 I am trying to implement HMVC with CodeIgniter. I used this library from bigbucket CI HMVC Library It works fine for me when i created admin module. But now i am trying to define module inside a modules. So, my structure will be like this :- Here "admmin" is my main module. And page is a sub module of admin. I again define two sub modules of page module 1) Static and 2) Dynamic. When i access the admin module using the url :- http://localhost/ci_hmvc/index.php/admin it works. But when i try

Unable to load libraries when using CI 3 with HMVC

别来无恙 提交于 2019-12-06 03:35:44
I started a Modular project in CI2 (using HMVC). I am moving the project to CI 3. I am trying to autoload the session library using config/autoload .php $autoload['libraries'] = array('database','session'); I get this error: Fatal error: Call to undefined method MY_Loader::_ci_load_class() in /srv/www/htdocs/projects/application/third_party/MX/Loader.php on line 158 Even if a manually load the library within the controller using $this->load->library('session'), i get the same error. I am convinced this is an error caused by using HMVC. I have managed to make CI 3 modular but I am stuck with

How to implement HMVC in codeigniter 3.0?

别来无恙 提交于 2019-11-29 03:20:02
问题 Currently I'm using codeigniter version 3.0. I want to know how to implement HMVC structure in it, can anyone help? 回答1: codeigniter 3 hmvc modules folder for: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads 1- Download files and copy C.i.3.0 forder in application 2- .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] 3- create /application/modules 4- /application/modules/welcome