Saving a model in a sub-folder such as models/cronjobs/Dbsconnection_model.php I always get a "Message: Unable to locate the model you have specified: Dbsconnection_model" error when i load it with
public function __construct()
{
parent::__construct();
require('application/config/CronJobs/CronjobsConfig.php');
**$this->load->model('cronjobs/dbsconnection_model');**
[......]
If i take the same model in the upper folder there are no troubles; in other words, this function
$this->load->model('dbsconnection_model');
does not trigger any error if the relative file is copied in the main models folder too. I tried also several combinations for the subfolder name:
changing it both in the filesystem and in the loading function. Any ideas?
You need to capitalize the first letter of your model class and it will work.
So you can still call it like
$this->load->model('cronjobs/dbsconnection_model');
But the model file itself needs to start with a capital letter.
For example
application/models/cronjobs/Dbsconnection_model.php