From ce66d155eca7d447bdcc6feb47c17647ac754c35 Mon Sep 17 00:00:00 2001
From: Derek Allard First, assign the CodeIgniter object to a variable: Once you've assigned the object to a variable, you'll use that variable instead of $this: Note: You'll notice that the above get_instance() function is being passed by reference:
$CI =& get_instance();
+$CI =& get_instance();
-$CI =& get_instance();
+$CI =& get_instance();
+
$CI->load->helper('url');
$CI->load->library('session');
$CI->config->item('base_url');
@@ -193,8 +194,9 @@ etc.
-$CI =& get_instance();
-
+$CI =& get_instance();
+
+
This is very important. Assigning by reference allows you to use the original CodeIgniter object rather than creating a copy of it.
Also, please note: If you are running PHP 4 it's usually best to avoid calling get_instance()
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
index e24c48ada..14e28d47f 100644
--- a/user_guide/general/hooks.html
+++ b/user_guide/general/hooks.html
@@ -127,7 +127,7 @@ $hook['pre_controller'][] = array(
Hook Points
-The following is a list of available hook points.
The following is a list of available hook points.
In order for the Profiler to compile and display your benchmark data you must name your mark points using specific syntax. - -Please read the information on setting Benchmark points in Benchmark Class page.
- - - - - - - - - +In order for the Profiler to compile and display your benchmark data you must name your mark points using specific syntax.
+Please read the information on setting Benchmark points in Benchmark Class page.
diff --git a/user_guide/general/security.html b/user_guide/general/security.html index 5fa6cf3d0..271fea8b6 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -99,13 +99,12 @@ retrieving data from your database. XML-RPC data, or even data from the SERVER array, you are encouraged to practice this three step approach:CodeIgniter provides the following functions to assist in this process:
The URI Class and the URL Helper @@ -116,7 +116,7 @@ by CodeIgniter. For example, if a URL is this:
In some cases you might prefer to use query strings URLs:
-index.php?c=products&m=view&id=345
+index.php?c=products&m=view&id=345
CodeIgniter optionally supports this capability, which can be enabled in your application/config.php file. If you open your config file you'll see these items:
@@ -128,7 +128,7 @@ $config['function_trigger'] = 'm';If you change "enable_query_strings" to TRUE this feature will become active. Your controllers and functions will then be accessible using the "trigger" words you've set to invoke your controllers and methods:
-index.php?c=controller&m=method
+index.php?c=controller&m=method
Please note: If you are using query strings you will have to build your own URLs, rather than utilizing the URL helpers (and other helpers that generate URLs, like some of the form helpers) as these are designed to work with -- cgit v1.2.3-24-g4f1b