aid

Wednesday, 15 April 2015

Libraries in CodeIgniter

Libraries in CodeIgniter
All of the available libraries in CodeIgniter 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 from a controller in mvc :

Sysntex: $this->load->library('class name');
Example: $this->load->library('form_validation');
Once initialized you can use it as indicated in the user guide page corresponding to that class.
Additionally you want to load multiple libraries in your application so you can be loaded at the same time by passing an array of libraries to the load function.

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

No comments:

Post a Comment