From 2f0bac87c73febde8019e7cbab541905bcb0e5dd Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 9 Oct 2006 17:36:45 +0000 Subject: --- user_guide/libraries/loader.html | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'user_guide/libraries/loader.html') diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html index b8da7aaf2..b93d5fa79 100644 --- a/user_guide/libraries/loader.html +++ b/user_guide/libraries/loader.html @@ -72,6 +72,29 @@ Loader Class +

$this->load->library('class_name')

+ +

This function is used to load core classes. Where class_name is the name of the class you want to load. +Note: We use the terms "class" and "library" interchangeably.

+ +

For example, if you would like to send email with Code Igniter, the first step is to load the email class within your controller:

+ +$this->load->library('email'); + +

Once loaded, the library will be ready for use, using $this->email->some_function(). + +Each library is described in detail in its own page, so please read theinformation regarding each one you would like to use.

+ +

If you would like your libraries assigned to a different variable name then the default you can specify the name in the second paramter:

+ + +$this->load->library('email', 'E'); // Assigns the email object to "E"
+
+$this->E->some_function() +
+ + +

$this->load->view('file_name', $data, true/false)

This function is used to load your View files. If you haven't read the Views section of the @@ -92,21 +115,6 @@ to your browser. Remember to assign it to a variable if you wan the data return $string = $this->load->view('myfile', '', true); - -

$this->load->library('class_name')

- -

This function is used to load core classes. Where class_name is the name of the class you want to load. -Note: We use the terms "class" and "library" interchangeably.

- -

For example, if you would like to send email with Code Igniter, the first step is to load the email class within your controller:

- -$this->load->library('email'); - -

Once loaded, the library will be ready for use. Each library is described in detail in its own page, so please read the -information regarding each one you would like to use.

- - -

$this->load->database('options', true/false)

This function lets you load the database class. The two parameters are optional. Please see the -- cgit v1.2.3-24-g4f1b