Reputation: 1371
I use latest version of CI, that is 2.1.2.
I upload my demo application in the following location http://www.domainname.com/myfolder/index.php
If i try to open home page, welcome controller is opened correctly. However if I try to open http://www.domainname.com/myfolder/index.php/controllername/functionname page, I get the following error message:
An Error Was Encountered
Unable to locate the model you have specified: backofficeusersmodel
In my config file, I have the following settings:
$config[‘base_url’] = ‘http://www.domainname/myfolder/’; $config[‘index_page’] = ‘index.php’; I also tried and
$config[‘base_url’] = ‘http://www.domainname.com/myfolder/application/’; $config[‘index_page’] = ‘index.php’;
without any success.
However, the model is uploaded and its name is backOfficeUsersModel, not as stated in the error message all lover case.
I would like to mention that I use myModel (uploaded in application/core), and that same strange thing was happening when I upload same application under some free hosting, just there the error was that mymodel could not be located.
I upload same application on different hosting company and there it worked. Also, same application work normally on my localhost.
Anyone had similar experience?
Upvotes: 2
Views: 5177
Reputation: 5311
Model files should be in application/models folder and should be named in lower case like backofficeusersmodel. Probably there is a deficiency in these requirements.
Upvotes: 4