From abc049ea54fab5206c6cc4c679e02b96f5a5201e Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 21 Sep 2006 06:23:28 +0000 Subject: --- user_guide/general/scripts.html | 115 ---------------------------------------- 1 file changed, 115 deletions(-) delete mode 100644 user_guide/general/scripts.html (limited to 'user_guide/general/scripts.html') diff --git a/user_guide/general/scripts.html b/user_guide/general/scripts.html deleted file mode 100644 index 7391ee979..000000000 --- a/user_guide/general/scripts.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - -Code Igniter User Guide - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

Code Igniter User Guide Version 1.4.1

-
- - - - - - - - - -
- - -
- - - -
- -

The Scripts Folder

- -

Inside the application directory you'll find a folder called scripts. Its purpose is -to give you a place to store your own script includes or classes.

- -

Loading a Script

- -

Your scripts can be loaded in your controllers or views using the following function:

- -$this->load->script('name'); - -

Where name is the file name of the script, without the .php file extension.

- -

For example, to load a file called utilities.php you would do this:

- -$this->load->script('utilities'); - -

If you load a script in your controller constructor it will be available -automatically in any function, or you can load it in a specific function that needs it.

- -

Note: The Script loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.

- -

Loading Multiple Scripts

- -

If you need to load more than one script you can specify them in an array, like this:

- -$this->load->script( array('script1', 'script2', 'script3') ); - -

Auto-loading Scripts

- -

If you find that you need a particular script globally throughout your application, you can tell Code Igniter to auto-load it -during system initialization. This is done by opening the application/config/autoload.php file and adding -the script to the autoload array.

- - - -
- - - - - - - \ No newline at end of file -- cgit v1.2.3-24-g4f1b