Blog Details

CodeIgniter Libraries


                                
                                    <h1></h1>
<h2><strong>* <span style="text-decoration: underline;">CodeIgniter Libraries :-</span></strong></h2>
&nbsp;
<ul>
	<li><span style="font-size: 13px;">All of the <strong>available libraries</strong> are located in your </span><strong><dfn style="font-size: 13px;">system/libraries</dfn></strong><span style="font-size: 13px;"> folder. In most cases, to use one of these classes involves <strong>initializing</strong> it within a <strong>controller</strong> </span><span style="font-size: 13px;">using the following <strong>initialization function:</strong></span></li>
</ul>
&nbsp;
<ul>
	<li>
<h2><strong><span style="font-size: 13px;">$this-&gt;load-&gt;library('</span><var style="font-size: 13px;">class name</var><span style="font-size: 13px;">');</span></strong></h2>
</li>
</ul>
&nbsp;
<ul>
	<li><span style="font-size: 13px;">Where </span><strong><var style="font-size: 13px;">class name</var></strong><span style="font-size: 13px;"><strong> </strong>is the name of the class you want to invoke. <strong>For example</strong>, to load the <strong>form validation class</strong> you would do this:</span></li>
</ul>
&nbsp;
<ul>
	<li><strong style="font-size: 1.5em;"><code>$this-&gt;load-&gt;library('<var>form_validation</var>');</code></strong></li>
</ul>
&nbsp;
<ul>
	<li><span style="font-size: 13px;">Once initialized you can use it as indicated in the user guide page corresponding to that class.</span></li>
	<li><span style="font-size: 13px;">Additionally,<strong> multiple libraries</strong> can be <strong>loaded</strong> at the same time by passing an array of libraries to the load function.</span></li>
</ul>
&nbsp;
<ul>
	<li><strong style="font-size: 1.5em;"><code>$this-&gt;load-&gt;library(array('<var>email</var>', '<var>table</var>'));</code></strong></li>
</ul>
                                    


Categories

CodeIgnitor

Latest posts

13.05.14
Implementing CRUD Operations ¶

<ul> <li>Now comes the fun part. We would like t

13.05.14
View

<ol> <li><a href="http://www.yiiframework.com/do

13.05.14
Creating Model

<ol> <li><a href="http://www.yiiframework.com/do

Get Free Quote