[eluser]Gwarrior[/eluser]
I'm using the Modular Extension, which seems like it could be great if I could get it working, but alas I cannot.
I followed the instructions to install it to a 't', and it worked. The welcome page loaded correctly. I created another controller in the controller folder called home.php, and it too worked. I copy-and-pasted the contents of home.php into another controller in the same folder and named the file login.php, and adjusted all of the contents like class name to be Login. Now it errors - although the code is almost exactly the same!
I'm trying to call a library that's in the module/libraries folder that will load all of the required libraries, models and helpers I need.
Here is home.php:
Code:
<?php
class Home extends Controller {
function __construct() {
parent::__construct();
$this->load->library('cc_loader');
$this->cc_loader->load_all();
}
function index() {
$this->load->view('home');
}
}
This is login.php:
Code:
<?php
class Login extends Controller {
function __construct() {
parent::__construct();
$this->load->library('cc_loader');
$this->cc_loader->load_all();
}
function index() {
$this->load->view('home');
}
}
Here is the error I get ONLY on login.php:
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined property: Login::$cc_loader
Filename: controllers/login.php
Line Number: 11
Fatal error: Call to a member function load_all() on a non-object in C:\wamp\www\cc_mod\system\application\modules\contentcreator\controllers\login.php on line 11
All I can say is WTF mate???