From befdc87b1ce6caf47c6f8b1dfa02333dfee8a950 Mon Sep 17 00:00:00 2001
From: Derek Allard
To autoload resources, open the application/config/autoload.php file and add the item you want diff --git a/user_guide/general/models.html b/user_guide/general/models.html index f2a676188..b111eacca 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -70,13 +70,13 @@ Models
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
@@ -124,8 +124,8 @@ class Blogmodel extends Model {
Note: The functions in the above example use the Active Record database functions.
- -Model classes are stored in your application/models/ folder. They can be nested within sub-folders if you want this type of organization.
@@ -161,8 +161,8 @@ class User_model extends Model {application/models/user_model.php
-
-Your models will typically be loaded and called from within your controller functions. To load a model you will use the following function:
@@ -207,10 +207,11 @@ class Blog_controller extends Controller {If you find that you need a particular model globally throughout your application, you can tell CodeIgniter to auto-load it during system initialization. This is done by opening the application/config/autoload.php file and adding the mdoel to the autoload array.
- -When a model is loaded it does NOT connect automatically to your database. The following options for connecting are available to you:
-- cgit v1.2.3-24-g4f1b