Skip to main content

CodeIgniter Overview

The first step is to install CodeIgniter, then read all the topics in the Introduction section of the Table of Contents.

Next, read each of the General Topics pages in order. Each topic builds on the previous one, and includes code examples that you are encouraged to try.

CodeIgniter Directory Structure:
General Topics:
    CodeIgniter URLs
    Controllers
    Reserved Names
    Views
    Models
    Helpers
    Using CodeIgniter Libraries
    Creating Libraries
    Using CodeIgniter Drivers
    Creating Drivers
    Creating Core System Classes
    Creating Ancillary Classes
    Hooks - Extending the Framework Core
    Auto-loading Resources
    Common Functions
    Compatibility Functions
    URI Routing
    Error Handling
    Caching
    Profiling Your Application
    Running via the CLI
    Managing your Applications
    Handling Multiple Environments
    Alternate PHP Syntax for View Files
    Security
    PHP Style Guide




Three Main Topic let discuss:

Controllers:
Controllers are the heart of your application, as they determine how HTTP requests should be handled.

Since your controller classes will extend the main application controller you must be careful not to name your methods identically to the ones used by that class, otherwise your local methods will override them. The following is a list of reserved names. Do not name your controller any of these:
    CI_Controller
    Default
    index


Models:
Models are optionally available for those who want to use a more traditional MVC approach.

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.

Views:

A view is simply a web page, or a page fragment, like a header, footer, sidebar, etc. In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type of hierarchy.

Views are never called directly, they must be loaded by a controller. Remember that in an MVC framework, the Controller acts as the traffic cop, so it is responsible for fetching a particular view. If you have not read the Controllers page you should do so before continuing.

What’s next?
Read the tutorial on understanding CodeIgniter following code.

Comments