Libraries in CI

Why I Copy other People’s Writings

All of the available libraries are located in your system/libraries folder. In most cases, to use one of these classes involves initializing it within a controller using the following initialization function:

$this->load->library('class name');

Where class name is the name of the class you want to invoke. For example, to load the form validation class you would do this:


Once initialized you can use it as indicated in the user guide page corresponding to that class.

Additionally, multiple libraries can be loaded at the same time by passing an array of libraries to the load function.

$this->load->library(array('email', 'table'));

Creating Your Own Libraries

Please read the section of the user guide that discusses how to create your own libraries.


About samehramzylabib

See About on
This entry was posted in CodeIgniter. Bookmark the permalink.


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s