Models are PHP classes that are designed to work with information in your database. For example, let’s say you use CodeIgniter to manage a blog. You might have a model class that contains functions to insert, update and retrieve your blog data.
Model classes are stored in your application/models/directory. They can be nested within sub-directories if you want this type of organization.
The basic prototype for a model class is this:
class Model_name extends CI_Model {Where Model_name is the name of your class. Class names must have the first letter capitalized with the rest of the name lowercase. Make sure your class extends the base Model class and you have to care to use everywhere the same name
Your models will typically be loaded and called from within your controller methods. To load a model you will use the following method:
If you start the model name in lower case localhost works fine but online it doesn't and they give below error.
CodeIgniter PHP Model Access "Unable to locate the model you have specified"Make sure: