I know many people here have faced this issue, and I've faced it many times and solved it. But this time I tried all I know and what I found on StackOverFlow but nothing worked..
My situation :
I have a model called ClientsManagement.php
in a folder like this :
application/models/Management/ClientsManagement.php
I tried doing :
$this->load->model('Management/ClientsManagement');
But I'm getting this error :
Unable to locate the model you have specified: ClientsManagement
Notice : It's working on windows, but I faced this problem while moving to linux (debian)..
Notes :
I respected the case (linux is case sensitive)
I have the rewritten mode working very well.
IT IS WORKING ON WINDOWS !
I would think would be best to do some thing like where it would have word model at the end or start of class and file name just so codeigniter can make sure it's model and not any thing else.
Folder-name: management => Clients_management_model.php
<?php
class Clients_management_model extends CI_Model {
public function some_function() {
}
}
Then Controller
public function __construct() {
parent::__construct();
$this->load->model('management/clients_management_model');
}
public function index() {
$data['something'] = $this->clients_management_model->some_function();
}
try this replace
$this->load->model('Management/ClientsManagement');
with
$this->load->model('Management/ClientsManagement','',true);