0

When I upload my website on the server I m getting this error

unable to locate the model you have specified

but in localhost, it is working fine

Danish Ali
  • 2,354
  • 3
  • 15
  • 26
  • it should be showing you other details as well, or is this all the error? – Tejashwi Kalp Taru Apr 10 '19 at 08:24
  • 2
    Possible duplicate of [CodeIgniter PHP Model Access "Unable to locate the model you have specified"](https://stackoverflow.com/questions/8074368/codeigniter-php-model-access-unable-to-locate-the-model-you-have-specified) – Tejashwi Kalp Taru Apr 10 '19 at 08:25

1 Answers1

0

Please state the error which you are facing with more details

Although check the following points

  1. check whether you have loaded the model in controller. It is most preferable that you load model in your constructor

    $this->load->model('Example_model');

  2. if you have model in a specific folder then the path will be as following

    $this->load->model('folder_name/Example_model');

  3. Check the name on model class. The first letter should be capital

    class Example_model extends CI_Model{ }

Rishi
  • 473
  • 4
  • 13