summaryrefslogtreecommitdiffstats
path: root/user_guide/general
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide/general')
-rw-r--r--user_guide/general/alternative_php.html142
-rw-r--r--user_guide/general/ancillary_classes.html122
-rw-r--r--user_guide/general/autoloader.html106
-rw-r--r--user_guide/general/base_classes.html127
-rw-r--r--user_guide/general/caching.html119
-rw-r--r--user_guide/general/changelog.html248
-rw-r--r--user_guide/general/controllers.html317
-rw-r--r--user_guide/general/creating_libraries.html222
-rw-r--r--user_guide/general/credits.html96
-rw-r--r--user_guide/general/errors.html142
-rw-r--r--user_guide/general/helpers.html140
-rw-r--r--user_guide/general/hooks.html184
-rw-r--r--user_guide/general/index.html95
-rw-r--r--user_guide/general/libraries.html111
-rw-r--r--user_guide/general/models.html256
-rw-r--r--user_guide/general/multiple_apps.html116
-rw-r--r--user_guide/general/plugins.html125
-rw-r--r--user_guide/general/quick_reference.html83
-rw-r--r--user_guide/general/requirements.html88
-rw-r--r--user_guide/general/routing.html163
-rw-r--r--user_guide/general/scaffolding.html153
-rw-r--r--user_guide/general/scripts.html115
-rw-r--r--user_guide/general/security.html159
-rw-r--r--user_guide/general/urls.html159
-rw-r--r--user_guide/general/views.html249
25 files changed, 3837 insertions, 0 deletions
diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html
new file mode 100644
index 000000000..8838ac8a0
--- /dev/null
+++ b/user_guide/general/alternative_php.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Alternate PHP Syntax
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Alternate PHP Syntax for View Files</h1>
+
+<p>If you do not utilize Code Igniter's <a href="../libraries/parser.html">template engine</a>, you'll be using pure PHP
+in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use PHPs alternative
+syntax for control structures and echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code,
+and eliminate "echo" statements.</p>
+
+<h2>Alternative Echos</h2>
+
+<p>Normally to echo, or print out a variable you would do this:</p>
+
+<code>&lt;?php echo $variable; ?></code>
+
+<p>With the alternative syntax you can instead do it this way:</p>
+
+<code>&lt;?=$variable?></code>
+
+<p class="important"><strong>Note:</strong> If you find that the syntax described in this page does not work on your server it might
+be that "short tags" are disabled in your PHP ini file.</p>
+
+
+<h2>Alternative Control Structures</h2>
+
+<p>Controls structures, like <var>if</var>, <var>for</var>, <var>foreach</var>, and <var>while</var> can be
+written in a simplified format as well. Here is an example using foreach:</p>
+
+<code>
+&lt;ul><br />
+<br />
+<var>&lt;?php foreach($todo as $item): ?></var><br />
+<br />
+&lt;li><var>&lt;?=$item?></var>&lt;/li><br />
+<br />
+<var>&lt;?php endforeach ?></var><br />
+<br />
+&lt;/ul></code>
+
+<p>Notice that there are no braces. Instead, the end brace is replaced with <var>endforeach</var>.
+Each of the control structures listed above has a similar closing syntax:
+<var>endif</var>, <var>endfor</var>, <var>endforeach</var>, and <var>endwhile</var></p>
+
+<p>Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is
+important!</p>
+
+<p>Here is another example, using if/elseif/else. Notice the colons:</p>
+
+
+<code><var>&lt;?php if ($username == 'sally'): ?></var><br />
+<br />
+&nbsp;&nbsp;&nbsp;&lt;h3>Hi Sally&lt;/h3><br />
+<br />
+<var>&lt;?php elseif ($username == 'joe'): ?></var><br />
+<br />
+&nbsp;&nbsp;&nbsp;&lt;h3>Hi Joe&lt;/h3><br />
+<br />
+<var>&lt;?php else: ?></var><br />
+<br />
+&nbsp;&nbsp;&nbsp;&lt;h3>Hi unknown user&lt;/h3><br />
+<br />
+<var>&lt;?php endif; ?></var></code>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="multiple_apps.html">Running Multiple Applications</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="security.html">Security</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html
new file mode 100644
index 000000000..fc67bec70
--- /dev/null
+++ b/user_guide/general/ancillary_classes.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Creating Ancillary Classes
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Creating Ancillary Classes</h1>
+
+<p>In some cases you may want to develop classes that exist apart from your controllers but have the ability to
+utilize all of Code Igniter's resources. This is easily possible as you'll see.</p>
+
+<h2>get_instance()</h2>
+
+
+<p><strong>Any class that you instantiate within your controller functions can access Code Igniter's native resources</strong> simply by using the <kbd>get_instance()</kbd> function.
+This function returns the main Code Igniter object.</p>
+
+<p>Normally, to call any of the available Code Igniter functions requires you to use the <kbd>$this</kbd> construct:</p>
+
+<code>
+<strong>$this</strong>->load->helper('url');<br />
+<strong>$this</strong>->load->library('session');<br />
+<strong>$this</strong>->config->item('base_url');<br />
+etc.
+</code>
+
+<p><kbd>$this</kbd>, however, only works within your controllers, your models, or your views.
+If you would like to use Code Igniter's classes from within your own custom classes you can do so as follows:</p>
+
+
+<p>First, assign the Code Igniter object to a variable:</p>
+
+<code>$obj =& get_instance();</code>
+
+<p>Once you've assigned the object to a variable, you'll use that variable <em>instead</em> of <kbd>$this</kbd>:</p>
+
+<code>
+$obj =& get_instance();<br /><br />
+$obj->load->helper('url');<br />
+$obj->load->library('session');<br />
+$obj->config->item('base_url');<br />
+etc.
+</code>
+
+<p class="important"><strong>Note:</strong> You'll notice that the above get_instance() function is being passed by reference:
+<br /><br />
+<var>$obj =& get_instance();</var>
+<br /><br />
+This is very important. Assigning by reference allows you to use the original Code Igniter object rather than creating a copy of it.</p>
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="creating_libraries.html">Creating Core Libraries</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="autoloader.html">Auto-loading Resources</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html
new file mode 100644
index 000000000..5f90fddad
--- /dev/null
+++ b/user_guide/general/autoloader.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Auto-loading Resources
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Auto-loading Resources</h1>
+
+<p>Code Igniter comes with an "Auto-load" feature that permits libraries, helpers, and plugins to be initialized
+automatically every time the system runs. If you need certain resources globally throughout your application you should
+consider auto-loading them for convenience.</p>
+
+<p>The following items can be loaded automatically:</p>
+
+<ul>
+<li>Core classes found in the "libraries" folder</li>
+<li>Helper files found in the "helpers" folder</li>
+<li>Plugins found in the "plugins" folder</li>
+<li>Your own Scripts found in the "applications/scripts" folder</li>
+<li>Custom config files found in the "config" folder</li>
+</ul>
+
+<p>To autoload resources, open the <var>application/config/autoload.php</var> file and add the item you want
+loaded to the <samp>autoload</samp> array. You'll find instructions in that file corresponding to each
+type of item.</p>
+
+<p class="important"><strong>Note:</strong> Do not include the file extension (.php) when adding items to the autoload array.</p>
+
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="libraries.html">Using Core Libraries</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="scaffolding.html">Scaffolding</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/base_classes.html b/user_guide/general/base_classes.html
new file mode 100644
index 000000000..215bd25b5
--- /dev/null
+++ b/user_guide/general/base_classes.html
@@ -0,0 +1,127 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Replacing System Classes
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Replacing System Classes</h1>
+
+<p>Every time Code Igniter runs there are several base classes that are initialized automatically as part of the core framework.
+It is possible, however, to swap any of the core system files with your own versions.&nbsp; Most users will never have any need to do this,
+but the option to replace them does exist for those that would like to significantly alter the Code Igniter core.
+</p>
+
+<p class="important"><strong>Note:</strong>&nbsp; Replacing a core system class with your own version has a lot of implications, so make sure you
+know what you are doing before attempting it.</p>
+
+
+<h2>System Class List</h2>
+
+<p>The following is a list of the core system files that are invoked every time Code Igniter runs:</p>
+
+<ul>
+<li>Benchmark</li>
+<li>Input</li>
+<li>Config</li>
+<li>Hooks</li>
+<li>Router</li>
+<li>URI</li>
+<li>Language</li>
+<li>Loader</li>
+<li>Controller</li>
+<li>Output</li>
+</ul>
+
+<h2>Replacing Core Classes</h2>
+
+<p>To use one of your own system classes instead of a default one simply place your version inside your local <dfn>libraries</dfn> directory:</p>
+
+<code>application/libraries/<dfn>some-class.php</dfn></code>
+
+<p>Any file named identically to one from the list above will be used instead of the one normally used.</p>
+
+<p>Please note that your class must use <kbd>CI</kbd> as a prefix. For example, if your file is named <kbd>Input.php</kbd> the class will be named:</p>
+
+<code>
+class CI_Input {<br /><br />
+
+}
+</code>
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="hooks.html">Hooks</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="scaffolding.html">Scaffolding</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html
new file mode 100644
index 000000000..a5edbe73f
--- /dev/null
+++ b/user_guide/general/caching.html
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Page Caching
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+
+<h1>Web Page Caching</h1>
+
+<p>Code Igniter lets you cache your pages in order to achieve maximum performance.
+
+Although Code Igniter is quite fast, the amount of dynamic information you display in your pages will correlate directly to the
+server resources, memory, and processing cycles utilized, which affect your page load speeds.
+By caching your pages, since they are saved in their fully rendered state, you can achieve performance that nears that of static web pages.
+
+
+<h2>How Does Caching Work?</h2>
+
+<p>Caching can be enabled on a per-page basis, and you can set the length of time that a page should remain cached before being refreshed.
+When a page is loaded for the first time, the cache file will be written to your <dfn>system/cache</dfn> folder. On subsequent page loads the cache file will be retrieved
+and sent to the requesting user's browser. If it has expired, it will be deleted and refreshed before being sent to the browser.</p>
+
+<p>Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.</p>
+
+<h2>Enabling Caching</h2>
+
+<p>To enable caching, put the following tag in any of your controller functions:</p>
+
+<code>$this->output->cache(<var>n</var>);</code>
+
+<p>Where <var>n</var> is the number of <strong>minutes</strong> you wish the page to remain cached between refreshes.</p>
+
+<p>The above tag can go anywhere within a function. It is not affected by the order that it appears, so place it wherever it seems
+most logical to you. Once the tag is in place, your pages will begin being cached.</p>
+
+<p class="important"><strong>Note:</strong> Before the cache files can be written you must set the file permissions on your
+<dfn>system/cache</dfn> folder such that it is writable (666 is usually appropriate).</p>
+
+<h2>Deleting Caches</h2>
+
+<p>If you no longer wish to cache a file you can remove the caching tag and it will not longer be refreshed when it expires. Note:
+Removing the tag will not delete the cache immediately. It will have to expire normally. If you need to remove it earlier you
+will need to manually delete it from your cache folder.</p>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="errors.html">Error Handling</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="multiple_apps.html">Running Multiple Applications</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html
new file mode 100644
index 000000000..0bcb165da
--- /dev/null
+++ b/user_guide/general/changelog.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Change Log
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Change Log</h1>
+
+
+
+<h2>Version 1.4.0</h2>
+<p>Release Date: August 25, 2006</p>
+
+<ul>
+<li>Added <a href="hooks.html">Hooks</a> feature, enabling you to tap into and modify the inner workings of the framework without hacking the core files.</li>
+<li>Added the ability to <a href="base_classes.html">replace core system classes</a> with your own classes.</li>
+<li>Added support for % character in URL.</li>
+<li>Moved the MIME type array out of the Upload class and into its own file in the applications/comfig/ folder.</li>
+<li>Removed a strtolower() call that was changing URL segments to lower case.</li>
+<li>Deprecated the hash() function due to a naming conflict with a native PHP function with the same name. Please use dohash() instead.</li>
+<li>Fixed a MS SQL issue.</li>
+<li>Fixed an issue when removing GET variables.</li>
+<li>Fixed <a href="http://www.codeigniter.com/forums/viewthread/773/">this</a> router bug.</li>
+<li>Fixed a bug that was preventing multiple discreet database calls.</li>
+<li>Fixed a bug in which loading a language file was producing a "file contains no data" message.</li>
+<li>Fixed a session bug caused by the XSS Filtering feature inadvertently changing the case of certain words.</li>
+<li>Removed backticks from Postgre class since these are not needed.</li>
+</ul>
+
+
+
+<h2>Version 1.3.3</h2>
+<p>Release Date: June 1, 2006</p>
+
+<ul>
+
+<li>Models do <strong>not</strong> connect automatically to the database as of this version. <a href="../general/models.html">More info here</a>.
+<li>Updated the Sessions class to utilize the active record class when running session related queries. Previously the queries assumed MySQL syntax.</li>
+<li>Updated alternator() function to re-initialize when called with no arguments, allowing multiple calls.</li>
+<li>Fixed a bug in the active record "having" function.</li>
+<li>Fixed a problem in the validation class which was making checkboxes be ignored when required.</li>
+<li>Fixed a bug in the word_limiter() helper function. It was cutting off the fist word.</li>
+<li>Fixed a bug in the xss_clean function due to a PHP bug that affects some versions of html_entity_decode.</li>
+<li>Fixed a validation bug that was preventing rules from being set twice in one controller.</li>
+<li>Fixed a calendar bug that was not letting it use dynamically loaded languages.</li>
+<li>Fixed a bug in the active record class when using WHERE clauses with LIKE</li>
+<li>Fixed a bug in the hash() security helper.</li>
+<li>Fixed some typos.</li>
+</ul>
+
+
+
+
+<h2>Version 1.3.2</h2>
+<p>Release Date: April 17, 2006</p>
+
+<ul>
+<li>Changed the behavior of the validation class such that if a "required" rule is NOT explicitly stated for a field then all other tests get ignored.</li>
+<li>Fixed a bug in the Controller class that was causing it to look in the local "init" folder instead of the main system one.</li>
+<li>Fixed a bug in the init_pagination file. The $config item was not being set correctly.</li>
+<li>Fixed a bug in the auto typography helper that was causing inconsistent behavior.</li>
+<li>Fixed a couple bugs in the Model class.</li>
+<li>Fixed some documentation typos and errata.</li>
+</ul>
+
+
+
+<h2>Version 1.3.1</h2>
+<p>Release Date: April 11, 2006</p>
+
+<ul>
+<li>Added a <a href="../libraries/unit_testing.html">Unit Testing Library</a>.</li>
+<li>Added the ability to pass objects to the <strong>insert()</strong> and <strong>update()</strong> database functions.
+This feature enables you to (among other things) use your <a href="../general/models.html">Model class</a> variables to run queries with. See the Models page for details.</li>
+<li>Added the ability to pass objects to the <a href="../general/views.html">view loading function</a>: $this->load->view('my_view', <var>$object</var>);</li>
+<li>Added <kbd>getwhere</kbd> function to <a href="../libraries/database/active_record.html">Active Record class</a>.</li>
+<li>Added <kbd>count_all</kbd> function to <a href="../libraries/database/active_record.html">Active Record class</a>.</li>
+<li>Added language file for scaffolding and fixed a scaffolding bug that occurs when there are no rows in the specified table.</li>
+<li>Added <a href="../libraries/database/queries.html">$this->db->last_query()</a>, which allows you to view your last query that was run.</li>
+<li>Added a new mime type to the upload class for better compatibility.</li>
+<li>Changed how cache files are read to prevent PHP errors if the cache file contains an XML tag, which PHP wants to interpret as a short tag.</li>
+<li>Fixed a bug in a couple of the active record functions (where and orderby).</li>
+<li>Fixed a bug in the image library when realpath() returns false.</li>
+<li>Fixed a bug in the Models that was preventing libraries from being used within them.</li>
+<li>Fixed a bug in the "exact_length" function of the validation class.</li>
+<li>Fixed some typos in the user guide</li>
+</ul>
+
+
+<h2>Version 1.3</h2>
+<p>Release Date: April 3, 2006</p>
+
+<ul>
+<li>Added support for <a href="models.html">Models</a>.</li>
+<li>Redesigned the database libraries to support additional RDBMs (Postgre, MySQLi, etc.).</li>
+<li>Redesigned the <a href="../libraries/database/active_record.html">Active Record class</a> to enable more varied types of queries with simpler syntax, and advanced features like JOINs.</li>
+<li>Added a feature to the database class that lets you run <a href="../libraries/database/call_function.html">custom function calls</a>.</li>
+<li>Added support for <a href="controllers.html">private functions</a> in your controllers. Any controller function name that starts with an underscore will not be served by a URI request.</li>
+<li>Added the ability to pass your own initialization parameters to your <a href="creating_libraries.html">custom core libraries</a> when using $this->load->library()</li>
+<li>Added support for running standard <a href="urls.html">query string URLs</a>. These can be optionally enabled in your config file.</li>
+<li>Added the ability to <a href="urls.html">specify a "suffix"</a>, which will be appended to your URLs. For example, you could add .html to your URLs, making them appear static. This feature is enabled in your config file.</li>
+<li>Added a new error template for use with native PHP errors.</li>
+<li>Added "alternator" function in the <a href="../helpers/string_helper.html">string helpers</a>.</p>
+<li>Removed slashing from the input class. After much debate we decided to kill this feature.</li>
+<li>Change the commenting style in the scripts to the PEAR standard so that IDEs and tools like phpDocumenter can harvest the comments.</li>
+<li>Added better class and function name-spacing to avoid collisions with user developed classes. All Code Igniter classes are now prefixed with <dfn>CI_</dfn> and
+all controller methods are prefixed with <dfn>_ci</dfn> to avoid controller collisions. A list of reserved function names can be <a href="controllers.html">found here</a>.</li>
+<li>Redesigned how the "CI" super object is referenced, depending on whether PHP 4 or 5 is being run, since PHP 5 allows a more graceful way to manage objects that utilizes a bit less resources.</li>
+<li>Deprecated: <var>$this->db->use_table()</var> has been deprecated. Please read the <a href="../libraries/database/active_record.html">Active Record</a> page for information.</li>
+<li>Deprecated: <var>$this->db->smart_escape_str()</var> has been deprecated. Please use this instead: <var>$this->db->escape()</var></li>
+<li>Fixed a bug in the exception handler which was preventing some PHP errors from showing up.</li>
+<li>Fixed a typo in the URI class. $this->total_segment() should be plural: $this->total_segments()</li>
+<li>Fixed some typos in the default calendar template</li>
+<li>Fixed some typos in the user guide</li>
+</ul>
+
+
+
+
+
+
+
+
+<h2>Version 1.2</h2>
+<p>Release Date: March 21, 2006</p>
+
+<ul>
+<li>Redesigned some internal aspects of the framework to resolve scoping problems that surfaced during the beta tests. The problem was most notable when instantiating classes in your constructors, particularly if those classes in turn did work in their constructors.</li>
+<li>Added a global function named <a href="ancillary_classes.html">get_instance()</a> allowing the main Code Igniter object to be accessible throughout your own classes.</li>
+<li>Added new <a href="../helpers/file_helper.html">File Helper</a>: delete_files()</li>
+<li>Added new <a href="../helpers/url_helper.html">URL Helpers</a>: base_url(), index_page()</li>
+<li>Added the ability to create your own <a href="creating_libraries.html">core libraries</a> and store them in your local application directory.</li>
+<li>Added an <kbd>overwrite</kbd> option to the <a href="../libraries/file_uploading.html">Upload class</a>, enabling files to be overwritten rather than having the file name appended.</li>
+<li>Added Javascript Calendar plugin.</li>
+<li>Added search feature to user guide. Note: This is done using Google, which at the time of this writing has not crawled all the pages of the docs.</li>
+<li>Updated the parser class so that it allows tag pars within other tag pairs.</li>
+<li>Fixed a bug in the DB "where" function.</li>
+<li>Fixed a bug that was preventing custom config files to be auto-loaded.</li>
+<li>Fixed a bug in the mysql class bind feature that prevented question marks in the replacement data.</li>
+<li>Fixed some bugs in the xss_clean function</li>
+</ul>
+
+
+
+
+
+<h2>Version Beta 1.1</h2>
+<p>Release Date: March 10, 2006</p>
+
+<ul>
+<li>Added a <a href="../libraries/calendar.html">Calendaring class</a>.</li>
+<li>Added support for running <a href="multiple_apps.html">multiple applications</a> that share a common Code Igniter backend.</li>
+<li>Moved the "uri protocol" variable from the index.php file into the config.php file</li>
+<li>Fixed a problem that was preventing certain function calls from working within constructors.</li>
+<li>Fixed a problem that was preventing the $this->load->library function from working in constructors.</li>
+<li>Fixed a bug that occurred when the session class was loaded using the auto-load routine.</li>
+<li>Fixed a bug that can happen with PHP versions that do not support the E_STRICT constant</li>
+<li>Fixed a data type error in the form_radio function (form helper)</li>
+<li>Fixed a bug that was preventing the xss_clean function from being called from the validation class.</li>
+<li>Fixed the cookie related config names, which were incorrectly specified as $conf rather than $config</li>
+<li>Fixed a pagination problem in the scaffolding.</li>
+<li>Fixed a bug in the mysql class "where" function.</li>
+<li>Fixed a regex problem in some code that trimmed duplicate slashes.</li>
+<li>Fixed a bug in the br() function in the HTML helper</li>
+<li>Fixed a syntax mistake in the form_dropdown function in the Form Helper.</li>
+<li>Removed the "style" attributes form the form helpers.</li>
+<li>Updated the documentation. Added "next/previous" links to each page and fixed various typos.</li>
+</ul>
+
+<h2>Version Beta 1.0 </h2>
+<p>Release Date: February 28, 2006</p>
+<p>First publicly released version.</p>
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="../license.html">License Agreement</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="credits.html">Credits</a>
+<p>
+
+<p><a href="#top">Top of Page</a> &nbsp;&middot;&nbsp; <a href="../index.html">User Guide Home</a><p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html
new file mode 100644
index 000000000..648298eb0
--- /dev/null
+++ b/user_guide/general/controllers.html
@@ -0,0 +1,317 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Controllers
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Controllers</h1>
+
+<p>Controllers are the heart of your application, as they determine how HTTP requests should be handled.</p>
+
+
+<ul>
+<li><a href="#what">What is a Controller?</a></li>
+<li><a href="#hello">Hello World</a></li>
+<li><a href="#functions">Functions</a></li>
+<li><a href="#private">Private Functions</a></li>
+<li><a href="#default">Defining a Default Controller</a></li>
+<li><a href="#constructors">Class Constructors</a></li>
+<li><a href="#reserved">Reserved Function Names</a></li>
+</ul>
+
+
+<a name="what"></a>
+<h2>What is a Controller?</h2>
+
+<p><dfn>A Controller is simply a class file that is named in a way that can be associated with a URI.</dfn></p>
+
+<p>Consider this URI:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/</code>
+
+<p>In the above example, Code Igniter would attempt to find a controller named <dfn>blog.php</dfn> and load it.</p>
+
+<p><strong>When a controller's name matches the first segment of a URI, it will be loaded.</strong></p>
+
+<a name="hello"></a>
+<h2>Let's try it:&nbsp; Hello World!</h2>
+
+<p>Let's create a simple controller so you can see it in action. Using your text editor, create a file called <dfn>blog.php</dfn>, and put the following code in it:</p>
+
+
+<textarea class="textarea" style="width:100%" cols="50" rows="10">
+<?php
+class Blog extends Controller {
+
+ function index()
+ {
+ echo 'Hello World!';
+ }
+}
+?>
+</textarea>
+
+
+
+<p>Then save the file to your <dfn>application/controllers/</dfn> folder.</p>
+
+<p>Now visit the your site using a URL similar to this:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/</code>
+
+<p>If you did it right, you should see <samp>Hello World!</samp>.</p>
+
+<p>Note: Class names must start with an uppercase letter. In other words, this is valid:
+
+<code>&lt;?php<br />
+class <var>Blog</var> extends Controller {<br />
+<br />
+}<br />
+?&gt;</code>
+
+<p>This is <strong>not</strong> valid:</p>
+
+<code>&lt;?php<br />
+class <var>blog</var> extends Controller {<br />
+<br />
+}<br />
+?&gt;</code>
+
+<p>Also, always make sure your controller <dfn>extends</dfn> the parent controller class so that it can inherit all its functions.</p>
+
+
+
+<a name="functions"></a>
+<h2>Functions</h2>
+
+<p>In the above example the function name is <dfn>index()</dfn>. The "index" function is always loaded by default if the
+<strong>second segment</strong> of the URI is empty. Another way to show your "Hello World" message would be this:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/<samp>index</samp>/</code>
+
+<p><strong>The second segment of the URI determines which function in the controller gets called.</strong></p>
+
+<p>Let's try it. Add a new function to your controller:</p>
+
+
+<textarea class="textarea" style="width:100%" cols="50" rows="15">
+<?php
+class Blog extends Controller {
+
+ function index()
+ {
+ echo 'Hello World!';
+ }
+
+ function comments()
+ {
+ echo 'Look at this!';
+ }
+}
+?>
+</textarea>
+
+<p>Now load the following URL to see the <dfn>comment</dfn> function:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/<samp>comments</samp>/</code>
+
+<p>You should see your new message.</p>
+
+<a name="private"></a>
+<h2>Private Functions</h2>
+
+<p>In some cases you may not want certain functions accessible publicly. To make a function private, simply add an
+underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:</p>
+
+<code>
+function _utility()<br />
+{<br />
+&nbsp;&nbsp;// some code<br />
+}</code>
+
+<p>Trying to access it via the URL, like this, will not work:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/<samp>_utility</samp>/</code>
+
+
+
+<a name="default"></a>
+<h2>Defining a Default Controller</h2>
+
+<p>Code Igniter can be told to load a default controller when a URI is not present,
+as will be the case when only your site root URL is requested. To specify a default controller, open
+your <dfn>application/config/routes.php</dfn> file and set this variable:</p>
+
+<code>$route['default_controller'] = '<var>Blog</var>';</code>
+
+<p>Where <var>Blog</var> is the name of the controller class you want used. If you now load your main index.php file without
+specifying any URI segments you'll see your Hello World message by default.</p>
+
+
+<a name="constructors"></a>
+<h2>Class Constructors</h2>
+
+
+<p>If you intend to use a constructor in any of your Controllers, you <strong>MUST</strong> place the following line of code in it:</p>
+
+<code>parent::Controller();</code>
+
+<p>The reason this line is necessary is because your local constructor will be overriding the one in the parent controller class so we need to manually call it.</p>
+
+
+<p>If you are not familliar with constructors, in PHP 4, a <em>constructor</em> is simply a function that has the exact same name as the class:</p>
+
+<code>
+&lt;?php<br />
+class <kbd>Blog</kbd> extends Controller {<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <kbd>Blog()</kbd><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<var>parent::Controller();</var><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}<br />
+?&gt;</code>
+
+<p>In PHP 5, constructors use the following syntax:</p>
+
+<code>
+&lt;?php<br />
+class <kbd>Blog</kbd> extends Controller {<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function <kbd>__construct()</kbd><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<var>parent::Controller();</var><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}<br />
+?&gt;</code>
+
+<p>Constructors are useful if you need to set some default values, or run a default process when your class is instantiated.
+Constructors can't return a value, but they can do some default work.</p>
+
+<a name="reserved"></a>
+<h2>Reserved Function Names</h2>
+
+<p>Since your controller classes will extend the main application controller you
+must be careful not to name your functions identically to the ones used by that class, otherwise your local functions
+will override them. The following
+is a list of reserved names. Do not name your controller functions any of these:</p>
+
+<ul>
+<li>Controller</li>
+<li>CI_Base</li>
+<li>_ci_autoload</li>
+<li>_ci_autoloader</li>
+<li>_ci_assign_core</li>
+<li>_ci_initialize</li>
+<li>_ci_init_database</li>
+<li>_ci_init_scaffolding</li>
+<li>_ci_is_loaded</li>
+<li>_ci_load</li>
+<li>_ci_scaffolding</li>
+<li>_ci_set_view_path</li>
+</ul>
+
+<p><br />If you are running PHP 4 there are some additional reserved names. These ONLY apply if you are running PHP 4.</p>
+
+<ul>
+<li>CI_Loader</li>
+<li>config</li>
+<li>database</li>
+<li>file</li>
+<li>helper</li>
+<li>helpers</li>
+<li>language</li>
+<li>library</li>
+<li>plugin</li>
+<li>plugins</li>
+<li>scaffolding</li>
+<li>script</li>
+<li>view</li>
+<li>vars</li>
+</ul>
+
+
+
+
+
+
+<h2>That's it!</h2>
+
+<p>That, in a nutshell, is all there is to know about controllers.</p>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="urls.html">Code Igniter URLs</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="views.html">Views</a>
+<p>
+
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html
new file mode 100644
index 000000000..fa3416767
--- /dev/null
+++ b/user_guide/general/creating_libraries.html
@@ -0,0 +1,222 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Creating Libraries
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Creating Libraries</h1>
+
+<p>When we use the term "Libraries" we are normally referring to the classes that are located in the <kbd>libraries</kbd>
+directory and described in the Class Reference of this user guide. In this case, however, we will instead describe how you can create your own libraries within
+your <dfn>application</dfn> directory in order to maintain separation between your local resources and the global framework resources.</p>
+
+<h2>Storage</h2>
+
+<p>In order for your libraries to be stored in your <kbd>application</kbd> folder you will need to create two directories in which to store them:</p>
+
+<ul>
+<li>application/<dfn>init</dfn></li>
+<li>application/<dfn>libraries</dfn></li>
+</ul>
+
+
+<h2>Anatomy of a Library</h2>
+
+<p>A class library consists of two components:</p>
+
+<ol>
+<li>An <kbd>init</kbd> file.</li>
+<li>A <kbd>class</kbd> file.</li>
+</ol>
+
+<h2>The Init File</h2>
+
+<p>An <kbd>init</kbd> file a small initialization file corresponding to each of your classes. The purpose of this file is to
+instantiate a particular class. Each init file must be named identically to your class file name, adding the "init_" prefix. For example, if your
+class is named <dfn>myclass.php</dfn> your init file will be named:</p>
+
+<code>init_myclass.php</code>
+
+<p>Within your init file you will place your initialization code. Here's an example of such code, using an imaginary class named <kbd>Myclass</kbd>:</p>
+
+
+<code>&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');<br />
+<br />
+if ( ! class_exists('<kbd>Myclass</kbd>'))<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;require_once(APPPATH.'libraries/<kbd>Myclass</kbd>'.EXT);<br />
+}<br />
+<br />
+$obj =& get_instance();<br />
+$obj-><kbd>myclass</kbd> = new <kbd>Myclass();</kbd><br />
+$obj->ci_is_loaded[] = '<kbd>myclass</kbd>';<br />
+<br />
+?&gt;</code>
+
+<h2>The Class File</h2>
+
+<p>Your class file itself will be placed inside your <dfn>libraries</dfn> directory:</p>
+
+<code>application/libraries/<dfn>myclass.php</dfn></code>
+
+<p>The class will have this basic prototype:</p>
+
+<code>&lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');<br />
+<br />
+class Myclass {<br />
+<br />
+}<br />
+?&gt;</code>
+
+
+<h2>Naming Conventions</h2>
+
+<ul>
+<li>All file names must be in lowercase: myclass.php and init_myclass.php</li>
+<li>Class names must be capitalize: class Myclass</li>
+</ul>
+
+
+<h2>Using Your Class</h2>
+
+<p>From within any of your <a href="controllers.html">Controller</a> classes you can initialize your class using the standard:</p>
+
+<code>$this->load->library('<kbd>myclass</kbd>');</code>
+
+<p>Once loaded you can access your class using:</p>
+
+<code>$this-><kbd>myclass</kbd>->function();</code>
+
+<p>Note: In your init file you can define the object variable name.</p>
+
+
+<h2>Passing Parameters Your Class</h2>
+
+<p>In the library loading function you can pass data via the second parameter and it will be available to your initialization file:</p>
+
+<code>
+$params = array('type' => 'large', 'color' => 'red');<br />
+<br />
+$this->load->library('myclass', <kbd>$params</kbd>);</code>
+
+<p>Parameters will be accessible using a variable called <kbd>$params</kbd>. By default this variable is set to FALSE.</p>
+
+
+<h2>Utilizing Code Igniter Resources within Your Library</h2>
+
+
+<p>To access Code Igniter's native resources within your library use the <kbd>get_instance()</kbd> function.
+This function returns the Code Igniter super object.</p>
+
+<p>Normally, to call any of the available Code Igniter functions requires you to use the <kbd>$this</kbd> construct:</p>
+
+<code>
+<strong>$this</strong>->load->helper('url');<br />
+<strong>$this</strong>->load->library('session');<br />
+<strong>$this</strong>->config->item('base_url');<br />
+etc.
+</code>
+
+<p><kbd>$this</kbd>, however, only works directly within your controllers, your models, or your views.
+If you would like to use Code Igniter's classes from within your own custom classes you can do so as follows:</p>
+
+
+<p>First, assign the Code Igniter object to a variable:</p>
+
+<code>$obj =& get_instance();</code>
+
+<p>Once you've assigned the object to a variable, you'll use that variable <em>instead</em> of <kbd>$this</kbd>:</p>
+
+<code>
+$obj =& get_instance();<br /><br />
+$obj->load->helper('url');<br />
+$obj->load->library('session');<br />
+$obj->config->item('base_url');<br />
+etc.
+</code>
+
+<p class="important"><strong>Note:</strong> You'll notice that the above get_instance() function is being passed by reference:
+<br /><br />
+<var>$obj =& get_instance();</var>
+<br /><br />
+<kbd>This is very important.</kbd> Assigning by reference allows you to use the original Code Igniter object rather than creating a copy of it.</p>
+
+
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="libraries.html">Using Libraries</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="ancillary_classes.html">Creating Ancillary Classes</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html
new file mode 100644
index 000000000..dd318b7d4
--- /dev/null
+++ b/user_guide/general/credits.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Credits
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Credits</h1>
+
+<p>Code Igniter was developed by <a href="http://www.ellislab.com">Rick Ellis</a>, who in his other life is CEO of
+<a href="http://www.pmachine.com">pMachine, Inc.</a> The core framework was written
+specifically for this application, while many of the class libraries, helpers, and sub-systems borrow from the code-base of
+<a href="http://www.pmachine.com/ee/">ExpressionEngine</a>, a Content Management System written by Rick Ellis and
+<a href="http://www.reedmaniac.com">Paul Burdick</a>.</p>
+
+<p>A hat tip goes to Ruby on Rails for inspiring us to create a PHP framework, and for
+bringing frameworks into the general consciousness of the web community.</p>
+
+<p>The Code Igniter logo and icons were created by Rick Ellis.</p>
+
+<p>The pull-down table of contents was created with the use of the <a href="http://moofx.mad4milk.net/">moo.fx library</a>.</p>
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="changelog.html">Change Log</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="../installation/downloads.html">Downloading Code Igniter</a>
+<p>
+
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html
new file mode 100644
index 000000000..60acbfe1f
--- /dev/null
+++ b/user_guide/general/errors.html
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Error Handling
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Error Handling</h1>
+
+<p>Code Igniter lets you build error reporting into your applications using the functions described below.
+In addition, it has an error logging class that permits error and debugging messages to be saved as text files.</p>
+
+<p class="important"><strong>Note:</strong> By default, Code Igniter displays all PHP errors. You might
+wish to change this behavior once your development is complete. You'll find the <dfn>error_reporting()</dfn>
+function located at the top of your main index.php file. Disabling error reporting will NOT prevent log files
+from being written if there are errors.</p>
+
+<p>Unlike most systems in Code Igniter, the error functions are simple procedural interfaces that are available
+globally throughout the application. This approach permits error messages to get triggered without having to worry
+about class/function scoping.</p>
+
+<p>The following functions let you generate errors:</p>
+
+<h2>show_error('<var>message</var>')</h2>
+<p>This function will display the error message supplied to it using the following error template:</p>
+<p><dfn>application/errors/</dfn><kbd>error_general.php</kbd></p>
+
+<h2>show_404('<var>page</var>')</h2>
+<p>This function will display the 404 error message supplied to it using the following error template:</p>
+<p><dfn>application/errors/</dfn><kbd>error_404.php</kbd></p>
+
+<p>The function expects the string passed to it to be the file path to the page that isn't found.
+Note that Code Igniter automatically shows 404 messages if controllers are not found.</p>
+
+
+<h2>log_message('<var>level</var>', '<samp>message</samp>')</h2>
+
+<p>This function lets you write messages to your log files. You must supply one of three "levels"
+in the first parameter, indicating what type of message it is (debug, error, info), with the message
+itself in the second parameter. Example:</p>
+
+<code>
+if ($some_var == "")<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;log_message('error', 'Some variable did not contain a value.');<br />
+}<br />
+else<br />
+{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;log_message('debug', 'Some variable was correctly set');<br />
+}<br />
+<br />
+log_message('info', 'The purpose of some variable is to provide some value.');<br />
+</code>
+
+<p>There are three message types:</p>
+
+<ol>
+<li>Error Messages. These are actual errors, such as PHP errors or user errors.</li>
+<li>Debug Messages. These are messages that assist in debugging. For example, if a class has been initialized, you could log this as debugging info.</li>
+<li>Informational Messages. These are the lowest priority messages, simply giving information regarding some process. Code Igniter doesn't natively generate any info messsages but you may want to in your application.</li>
+</ol>
+
+
+<p class="important"><strong>Note:</strong> In order for the log file to actually be written, the "log_errors"
+option must be enabled in your <kbd>application/config/config.php</kbd> file, and the "logs" folder must be writable.
+In addition, you'll can set the "threshold" for logging.
+You might, for example, only want error messages to be logged, and not the other two types.</p>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="routing.html">URI Routing</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="caching.html">Page Caching</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html
new file mode 100644
index 000000000..1bed4a8b0
--- /dev/null
+++ b/user_guide/general/helpers.html
@@ -0,0 +1,140 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Helper Functions
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Helper Functions</h1>
+
+<p>Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular
+category. There are <dfn>URL Helpers</dfn>, that assist in creating links, there are <dfn>Form Helpers</dfn>
+that help you create form elements, <dfn>Text Helpers</dfn> perform various text formatting routines,
+<dfn>Cookie Helpers</dfn> set and read cookies, <dfn>File Helpers</dfn> help you deal with files, etc.
+</p>
+
+<p>Unlike most other systems in Code Igniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions.
+Each helper function performs one specific task, with no dependence on other functions.</p>
+
+<p>Code Igniter does not load Helper Files by default, so the first step in using
+a Helper is to load it. Once loaded, it becomes globally available in your <a href="../general/controllers.html">controller</a> and <a href="../general/views.html">views</a>.</p>
+
+<h2>Loading a Helper</h2>
+
+<p>Loading a helper file is quite simple using the following function:</p>
+
+<code>$this->load->helper('<var>name</var>');</code>
+
+<p>Where <var>name</var> is the file name of the helper, without the .php file extension or the "helper" part.</p>
+
+<p>For example, to load the <dfn>URL Helper</dfn> file, which is named <var>url_helper.php</var>, you would do this:</p>
+
+<code>$this->load->helper('<var>url</var>');</code>
+
+<p>A helper can be loaded anywhere within your controller functions (or even within your View files, although that's not a good practice),
+as long as you load it before you use it. You can load your helpers in your controller constructor so that they become available
+automatically in any function, or you can load a helper in a specific function that needs it.</p>
+
+<p class="important">Note: The Helper loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.</p>
+
+
+<h2>Loading Multiple Helpers</h2>
+
+<p>If you need to load more than one helper you can specify them in an array, like this:</p>
+
+<code>$this->load->helper( <samp>array(</samp>'<var>helper1</var>', '<var>helper2</var>', '<var>helper3</var>'<samp>)</samp> );</code>
+
+<h2>Auto-loading Helpers</h2>
+
+<p>If you find that you need a particular helper globally throughout your application, you can tell Code Igniter to auto-load it during system initialization.
+This is done by opening the <var>application/config/autoload.php</var> file and adding the helper to the autoload array.</p>
+
+
+<h2>Using a Helper</h2>
+
+<p>Once you've loaded the Helper File containing the function you intend to use, you'll call it the way you would a standard PHP function.</p>
+
+<p>For example, to create a link using the <dfn>anchor()</dfn> function in one of your view files you would do this:</p>
+
+<code>&lt;?=anchor('blog/comments', 'Click Here');?&gt;</code>
+
+<p>Where "Click Here" is the name of the link, and "blog/comments" is the URI to the controller/function you wish to link to.</p>
+
+
+<h2>Now What?</h2>
+
+<p>In the Table of Contents you'll find a list of all the available Helper Files. Browse each one to see what they do.</p>
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="views.html">Views</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="plugins.html">Plugins</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
new file mode 100644
index 000000000..301654653
--- /dev/null
+++ b/user_guide/general/hooks.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Hooks - Extending the Framework Core
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Hooks - Extending the Framework Core</h1>
+
+<p>Code Igniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files.
+When Code Igniter runs it follows a specific execution process, diagramed in the <a href="../overview/appflow.html">Application Flow</a> page.
+There may be instances, however, where you'd like to cause some action to take place at a particular stage in the execution process.
+For example, you might want to run a script right before your controllers get loaded, or right after, or you might want to trigger one of
+your own scripts in some other location.
+</p>
+
+
+<h2>Defining a Hook</h2>
+
+<p>Hooks are defined in <dfn>application/config/hooks.php</dfn> file. Each hook is specified as an array with this prototype:</p>
+
+<code>
+$hook['pre_controller'] = array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'class'&nbsp;&nbsp;&nbsp;&nbsp;=> 'MyClass',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'function' => 'Myfunction',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filename' => 'Myclass.php',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filepath' => 'hooks',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'params'&nbsp;&nbsp;&nbsp;=> array('beer', 'wine', 'snacks')<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</code>
+
+<p><strong>Notes:</strong><br />The array index correlates to the name of the particular hook point you want to
+use. In the above example the hook point is <kbd>pre_controller</kbd>. A list of hook points is found below.
+The following items should be defined in your associative hook array:</p>
+
+<ul>
+<li><strong>class</strong>&nbsp; The name of the class you wish to invoke. If you prefer to use a procedural function instead of a class, leave this item blank.</li>
+<li><strong>function</strong>&nbsp; The function name you wish to call.</li>
+<li><strong>filename</strong>&nbsp; The file name containing your class/function.</li>
+<li><strong>filepath</strong>&nbsp; The name of the directory containing your script. Note: Your script must be located in a directory INSIDE your <kbd>application</kbd> folder, so the file path is relative to that folder. For example, if your script is located in <dfn>application/hooks</dfn>, you will simply use <samp>hooks</samp> as your filepath. If your script is located in <dfn>application/hooks/utilities</dfn> you will use <samp>hooks/utilities</samp> as your filepath. No trailing slash.</li>
+<li><strong>params</strong>&nbsp; Any parameters you wish to pass to your script. This item is optional.</li>
+</ul>
+
+
+<h2>Multiple Calls to the Same Hook</h2>
+
+<p>If want to use the same hook point with more then one script, simply make your array declaration multi-dimensional, like this:
+
+<code>
+$hook['pre_controller']<kbd>[]</kbd> = array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'class'&nbsp;&nbsp;&nbsp;&nbsp;=> 'MyClass',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'function' => 'Myfunction',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filename' => 'Myclass.php',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filepath' => 'hooks',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'params'&nbsp;&nbsp;&nbsp;=> array('beer', 'wine', 'snacks')<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />
+<br />
+$hook['pre_controller']<kbd>[]</kbd> = array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'class'&nbsp;&nbsp;&nbsp;&nbsp;=> 'MyOtherClass',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'function' => 'MyOtherfunction',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filename' => 'Myotherclass.php',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'filepath' => 'hooks',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'params'&nbsp;&nbsp;&nbsp;=> array('red', 'yellow', 'blue')<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);</code>
+
+<p>Notice the brackets after each array index:</p>
+
+<code>$hook['pre_controller']<kbd>[]</kbd></code>
+
+<p>This permits you to the same hook point with multiple scripts. The order you define your array will be the execution order.</p>
+
+
+<h2>Hook Points</h2>
+
+The following is a list of available hook points.</p>
+
+<ul>
+
+<li><strong>pre_system</strong><br />
+Called very early during system execution. Only the benchmark and hooks class have been loaded at this point. No routing or other processes have happened.</li>
+
+<li><strong>pre_controller</strong><br />
+Called immediately prior to any of your controllers being called. All base classes, routing, and security checks have been done.</li>
+
+<li><strong>post_controller</strong><br />
+Called immediately after the controller is called.</li>
+
+<li><strong>display_override</strong><br />
+Overrides the <dfn>_display()</dfn> function, used to send the finalized page to the web browser at the end of system execution. This permits you to
+use your own display methodology. Note that the finalized data will be available by calling <dfn>$this->output->get_output()</dfn></li>
+
+<li><strong>cache_override</strong><br />
+Enables you to call your own function instead of the <dfn>_display_cache()</dfn> function in the output class. This permits you to use your own cache display mechanism.</li>
+
+<li><strong>scaffolding_override</strong><br />
+Permits a scaffolding request to trigger your own script instead.</li>
+
+<li><strong>post_system</strong><br />
+Called after the final rendered page is sent to the browser, at the end of system execution after the finalized data is sent to the browser.</li>
+
+
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="autoloader.html">Auto-loading Resources</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="scaffolding.html">Scaffolding</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/index.html b/user_guide/general/index.html
new file mode 100644
index 000000000..31e99d53e
--- /dev/null
+++ b/user_guide/general/index.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Getting Started
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Getting Started With Code Igniter</h1>
+
+<p>Any software application requires some effort to learn. We've done our best to minimize the learning
+curve, while making the process as enjoyable as possible.
+</p>
+
+<p>The first step is to <a href="../installation/index.html">install</a> Code Igniter, then read
+all the topics in the <strong>Introduction</strong> section of the User Guide.</p>
+
+<p>Next, read each of the <strong>General Topics</strong> pages in order.
+Each topic builds on the previous one, and includes code examples that you are encouraged to try.</p>
+
+<p>Once you understand the basics you'll be ready to explore the <strong>Class Reference</strong> and
+<strong>Helper Reference</strong> pages to learn to utilize the native libraries and helper files.</p>
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="../overview/goals.html">Architectural Goals</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="urls.html">Code Igniter URLs</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html
new file mode 100644
index 000000000..642399ba9
--- /dev/null
+++ b/user_guide/general/libraries.html
@@ -0,0 +1,111 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Loading Libraries
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Loading Libraries</h1>
+
+<p>The core libraries are the class files located in the "libraries" folder.
+In most cases, to use one of these classes involves initializing it within your controllers using the following function:</p>
+
+<code>$this->load->library('<var>class name</var>'); </code>
+
+<p>Where <var>class name</var> is the name of the class you want to invoke. For example, to load the validation class you would do this:</p>
+
+<code>$this->load->library('<var>validation</var>'); </code>
+
+<p>Once initialized you can use it as indicated in the user guide page corresponding to each class.</p>
+
+<h2>Semantic Relevance</h2>
+
+<p>The pattern you will use when calling functions is this:</p>
+
+<p><kbd>$this</kbd>-><dfn>class</dfn>-><samp>function()</samp></p>
+
+<p>We've placed a high value on semantic relevance in the naming of our classes and functions.
+Here are some examples of function calls you might use in Code Igniter:</p>
+
+<p><kbd>$this</kbd>-><dfn>email</dfn>-><samp>send()</samp></p>
+<p><kbd>$this</kbd>-><dfn>input</dfn>-><samp>user_agent()</samp></p>
+<p><kbd>$this</kbd>-><dfn>benchmark</dfn>-><samp>elapsed_time()</samp></p>
+<p><kbd>$this</kbd>-><dfn>db</dfn>-><samp>query()</samp></p>
+<p><kbd>$this</kbd>-><dfn>load</dfn>-><samp>helper()</samp></p>
+<p><kbd>$this</kbd>-><dfn>uri</dfn>-><samp>segment()</samp></p>
+<p><kbd>$this</kbd>-><dfn>lang</dfn>-><samp>line()</samp></p>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="scripts.html">Scripts</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="creating_libraries.html">Creating Libraries</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/models.html b/user_guide/general/models.html
new file mode 100644
index 000000000..dfb45d622
--- /dev/null
+++ b/user_guide/general/models.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Models
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Models</h1>
+
+<p>Models are <strong>optionally</strong> available for those who want to use a more
+traditional MVC approach.</p>
+
+
+
+<ul>
+<li><a href="#what">What is a Model?</a></li>
+<li><a href="#anatomy">Anatomy of a Model</a></li>
+<li><a href="#loading">Loading a Model</a></li>
+<li><a href="#conn">Connecting to your Database</a></li>
+
+</ul>
+
+
+<a name="what"></a>
+<h2>What is a Model?</h2>
+
+<p>Models are PHP classes that are designed to work with information in your database. For example, let's say
+you use Code Igniter to manage a blog. You might have a model class that contains functions to insert, update, and
+retrieve your blog data. Here is an example of what such a model class might look like:</p>
+
+<code>
+class&nbsp;Blogmodel&nbsp;extends&nbsp;Model&nbsp;{<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;var $title&nbsp;&nbsp; = '';<br />
+&nbsp;&nbsp;&nbsp;&nbsp;var $content = '';<br />
+&nbsp;&nbsp;&nbsp;&nbsp;var $date&nbsp;&nbsp;&nbsp; = '';<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;Blogmodel()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Call the Model constructor<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+&nbsp;&nbsp;&nbsp;&nbsp;<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;get_last_ten_entries()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = $this->db->get('entries', 10);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return $query->result();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;insert_entry()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->title&nbsp;&nbsp; = $_POST['title'];<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->content = $_POST['content'];<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->date&nbsp;&nbsp;&nbsp; = time();<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->db->insert('entries',&nbsp;$this);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;update_entry()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->title&nbsp;&nbsp; = $_POST['title'];<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->content = $_POST['content'];<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->date&nbsp;&nbsp;&nbsp; = time();<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->db->update('entries',&nbsp;$this, array('id',&nbsp;$_POST['id']));<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+<br />
+}</code>
+
+<p>Note: The functions in the above example use the <a href="../libraries/database/active_record.html">Active Record</a> database functions.</p>
+
+
+<a name="anatomy"></a>
+<h2>Anatomy of a Model</h2>
+
+<p>Model classes are stored in your <dfn>application/models/</dfn> folder. The basic prototype for a model is this:</p>
+
+
+<code>
+class&nbsp;<var>Model_name</var>&nbsp;extends&nbsp;Model&nbsp;{<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>Model_name</var>()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}</code>
+
+<p>Where <var>Model_name</var> is the name of your class. Class names <strong>must</strong> be capitalized.
+Make sure your class extends the base Model class.</p>
+
+<p>The file name will be a lower case version of your class name. For example, if your class is this:</p>
+
+<code>
+class&nbsp;<var>User_model</var>&nbsp;extends&nbsp;Model&nbsp;{<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;<var>User_model</var>()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::Model();<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}</code>
+
+<p>Your file will be this:</p>
+
+<code>application/models/<var>user_model.php</var></code>
+
+
+<a name="loading"></a>
+<h2>Loading a Model</h2>
+
+<p>Your models will typically be loaded and called from within your <a href="controllers.html">controller</a> functions.
+To load a model you will use the following function:</p>
+
+<code>$this->load->model('<var>Model_name</var>');</code>
+
+<p>Once loaded, you will access your model functions using an object with the same name as your class:</p>
+
+<code>
+$this->load->model('<var>Model_name</var>');<br />
+<br />
+$this-><var>Model_name</var>->function();
+</code>
+
+<p>If you would like your model assigned to a different object name you can specify it via the second parameter of the loading
+function:</p>
+
+
+<code>
+$this->load->model('<var>Model_name</var>', '<kbd>fubar</kbd>');<br />
+<br />
+$this-><kbd>fubar</kbd>->function();
+</code>
+
+<p>Here is an example of a controller, that loads a model, then serves a view:</p>
+
+<code>
+class&nbsp;Blog_controller&nbsp;extends&nbsp;Controller&nbsp;{<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;blog()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->load->model('Blog');<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data['query'] = $this->Blog->get_last_ten_entries();<br /><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this->load->view('blog', $data);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}</code>
+
+
+
+<a name="conn"></a>
+<h2>Connecting to your Database</h2>
+
+<p>When a model is loaded it does <strong>NOT</strong> connect automatically to your database. The following options for connecting are available to you:</p>
+
+<ul>
+<li>You can connect using the standard database methods <a href="../libraries/database/connecting.html">described here</a>, either from within your Controller class or your Model class.</li>
+<li>You can tell the model loading function to auto-connect by passing <kbd>TRUE</kbd> (boolean) via the third parameter,
+and connectivity settings, as defined in your database config file will be used:
+
+ <code>$this->load->model('<var>Model_name</var>', '', <kbd>TRUE</kbd>);</code>
+ </li>
+
+
+<li>You can manually pass database connectivity settings via the third parameter:
+
+
+ <code>$config['hostname'] = "localhost";<br />
+ $config['username'] = "myusername";<br />
+ $config['password'] = "mypassword";<br />
+ $config['database'] = "mydatabase";<br />
+ $config['dbdriver'] = "mysql";<br />
+ $config['dbprefix'] = "";<br />
+ $config['pconnect'] = FALSE;<br />
+ $config['db_debug'] = TRUE;<br />
+ $config['active_r'] = TRUE;<br />
+ <br />
+ $this->load->model('<var>Model_name</var>', '', <kbd>$config</kbd>);</code></li>
+</ul>
+
+
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="views.html">Views</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="helpers.html">Helpers</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/multiple_apps.html b/user_guide/general/multiple_apps.html
new file mode 100644
index 000000000..229349493
--- /dev/null
+++ b/user_guide/general/multiple_apps.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Running Multiple Applications
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Running Multiple Applications with one Code Igniter Installation</h1>
+
+<p>By default it is assumed that you only intend to use Code Igniter to manage one application, which you will build in your
+<dfn>system/application/</dfn> directory. It is possible, however, to have multiple sets of applications that share a single
+Code Igniter installation. To do this you will put all of the directories located inside your <kbd>application</kbd> folder into their
+own sub-folder.</p>
+
+<p>For example, let's say you want to create two applications, "foo" and "bar". You will structure your
+application folder like this:
+
+<code>system/application/<var>foo</var>/<br />
+system/application/<var>foo</var>/config/<br />
+system/application/<var>foo</var>/controllers/<br />
+system/application/<var>foo</var>/errors/<br />
+system/application/<var>foo</var>/models/<br />
+system/application/<var>foo</var>/scripts/<br />
+system/application/<var>foo</var>/views/<br />
+system/application/<samp>bar</samp>/<br />
+system/application/<samp>bar</samp>/config/<br />
+system/application/<samp>bar</samp>/controllers/<br />
+system/application/<samp>bar</samp>/errors/<br />
+system/application/<samp>bar</samp>/models/<br />
+system/application/<samp>bar</samp>/scripts/<br />
+system/application/<samp>bar</samp>/views/</code>
+
+
+<p>To select a particular application for use requires that you open your main <kbd>index.php</kbd> file and set the <dfn>$application_folder</dfn>
+variable. For example, to select the "foo" application for use you would do this:</p>
+
+<code>$application_folder = "foo";</code>
+
+
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="caching.html">Web Page Caching</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="alternative_php.html">Alternative PHP Syntax</a>
+<p>
+
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/plugins.html b/user_guide/general/plugins.html
new file mode 100644
index 000000000..c28dd321f
--- /dev/null
+++ b/user_guide/general/plugins.html
@@ -0,0 +1,125 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Plugins
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+
+<h1>Plugins</h1>
+
+<p>Plugins work almost identically to <a href="helpers.html">Helpers</a>. The main difference is that a plugin usually
+provides a single function, whereas a Helper is usually a collection of functions. Helpers are also considerd a part of
+the core system; plugins are intended to be created and shared by our community.</p>
+
+
+<h2>Loading a Plugin</h2>
+
+<p>Loading a plugin file is quite simple using the following function:</p>
+
+<code>$this->load->plugin('<var>name</var>');</code>
+
+<p>Where <var>name</var> is the file name of the plugin, without the .php file extension or the "plugin" part.</p>
+
+<p>For example, to load the <dfn>Captcha</dfn> plugin, which is named <var>captcha_pi.php</var>, you will do this:</p>
+
+<code>$this->load->plugin('<var>captcha</var>');</code>
+
+<p>A plugin can be loaded anywhere within your <a href="../general/controllers.html">controller</a> functions (or even within your <a href="../general/views.html">View files</a>, although that's not a good practice),
+as long as you load it before you use it. You can load your plugins in your controller constructor so that they become available
+automatically in any function, or you can load a plugin in a specific function that needs it.</p>
+
+<p class="important">Note: The Plugin loading function above does not return a value, so don't try to assign it to a variable. Just use it as shown.</p>
+
+
+<h2>Loading Multiple Plugins</h2>
+
+<p>If you need to load more than one plugin you can specify them in an array, like this:</p>
+
+<code>$this->load->plugin( <samp>array(</samp>'<var>plugin1</var>', '<var>plugin2</var>', '<var>plugin3</var>'<samp>)</samp> );</code>
+
+<h2>Auto-loading Plugins</h2>
+
+<p>If you find that you need a particular plugin globally throughout your application, you can tell Code Igniter to auto-load it
+during system initialization. This is done by opening the <var>application/config/autoload.php</var> file and adding the plugin to the autoload array.</p>
+
+
+<h2>Using a Plugin</h2>
+
+<p>Once you've loaded the Plugin, you'll call it the way you would a standard PHP function.</p>
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="helpers.html">Helpers</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="scripts.html">Scripts</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html
new file mode 100644
index 000000000..3e95fac6c
--- /dev/null
+++ b/user_guide/general/quick_reference.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Quick Reference Chart
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Quick Reference Chart</h1>
+
+<p>For a PDF version of this chart, <a href="http://www.codeigniter.com/downloads/ci_quick_ref.pdf">click here</a>.
+
+<p><img src="../images/ci_quick_ref.png" width="763" height="994" border="0" /></p>
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>
+<p>
+
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html
new file mode 100644
index 000000000..8e18ab09a
--- /dev/null
+++ b/user_guide/general/requirements.html
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Server Requirements
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Server Requirements</h1>
+
+<ul>
+ <li><a href="http://www.php.net/">PHP</a> version 4.3.2 or newer</li>
+ <li>A Database. Supported databases are MySQL, MySQLi, MS SQL, Postgre, SQLite, and ODBC</li>
+</ul>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+
+<div id="footer">
+<p>
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="../license.html">License Agreement</a>
+<p>
+
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html
new file mode 100644
index 000000000..c6e8bd9cf
--- /dev/null
+++ b/user_guide/general/routing.html
@@ -0,0 +1,163 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+URI Routing
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>URI Routing</h1>
+
+<p>Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method.
+The segments in a URI normally follow this pattern:</p>
+
+<code>www.your-site.com/<dfn>class</dfn>/<samp>function</samp>/<var>id</var>/</code>
+
+<p>In some instances, however, you may want to remap this relationship so that a different class/function can be called
+instead of the one corresponding to the URL.</p>
+
+<p>For example, lets say you want your URLs to have this prototype:</p>
+
+<p>
+www.your-site.com/product/1/<br />
+www.your-site.com/product/2/<br />
+www.your-site.com/product/3/<br />
+www.your-site.com/product/4/
+</p>
+
+<p>Normally the second segment of the URL is reserved for the function name, but in the example above, it instead has a product ID.
+To overcome this, Code Igniter allows you to remap the URI handler.</p>
+
+
+<h2>Setting your own routing rules</h2>
+
+<p>Routing rules are defined in your <var>application/config/routes.php</var> file. In it you'll see an array called <dfn>$route</dfn>, that
+you can use to specify your own routing criteria. A typical route might look something like this:</p>
+
+<code>$route['product/:num'] = "catalog/product_lookup";</code>
+
+<p>In a route, the array key contains the URI to be matched, while the array value contains the destination it should be re-routed to.
+In the above example, if the literal word "product" is found in the first segment of the URL, and a number is found in the second segment,
+the "catalog" class and the "product_lookup" method are instead used.</p>
+
+<p>You can match literal values or you can use two wildcard types:</p>
+
+<p>
+:num<br />
+:any
+</p>
+
+<p><strong>:num</strong> will match a segment containing only numbers.<br />
+<strong>:any</strong> will match a segment containing any character.
+</p>
+
+<p class="important"><strong>Note:</strong> Routes will run in the order they are defined.
+Higher routes will always take precedence over lower ones.</p>
+
+
+<h2>Examples</h2>
+
+<p>Here are a few routing examples:</p>
+
+<code>$route['journals'] = "blogs";</code>
+<p>Any URL containing the word "journals" in the first segment will be remapped to the "blogs" class.</p>
+
+<code>$route['blog/joe'] = "blogs/users/34";</code>
+<p>Any URL containing the segments blog/joe will be remapped to the "blogs" class and the "users" method. The ID will be set to "34".</p>
+
+
+<code>$route['product/:any'] = "catalog/product_lookup";</code>
+<p>Any URL with "product" as the first segment, and anything in the second will be remapped to the "catalog" class and the "product_lookup" method.</p>
+
+<p class="important"><strong>Important:</strong> Do not use leading/trailing slashes.</p>
+
+
+<h2>Reserved Route</h2>
+
+<p>There are two reserved routes:</p>
+
+<code>$route['default_controller'] = 'welcome';</code>
+
+<p>This route indicates which controller class should be loaded if the URI contains no data, which will be the case
+when people load your root URL. In the above example, the "welcome" class would be loaded. You
+are encouraged to always have a default route otherwise a 404 page will appear by default.</p>
+
+<code>$route['scaffolding_trigger'] = 'scaffolding';</code>
+
+<p>This route lets you set a secret word, which when present in the URL, triggers the scaffolding feature.
+Please read the <a href="scaffolding.html">Scaffolding</a> page for details.</p>
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="scaffolding.html">Scaffolding</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="errors.html">Error Handling</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html
new file mode 100644
index 000000000..3b32c3692
--- /dev/null
+++ b/user_guide/general/scaffolding.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Scaffolding
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Scaffolding</h1>
+
+<p>Code Igniter's Scaffolding feature provides a fast and very convenient way to add, edit, or delete information in your database
+during development.</p>
+
+<p class="important"><strong>Very Important:</strong> Scaffolding is intended for development use only. It provides very little
+security other than a "secret" word, so anyone who has access to your Code Igniter site can potentially edit or delete your information.
+If you use scaffolding make sure you disable it immediately after you are through using it. DO NOT leave it enabled on a live site.
+And please, set a secret word before you use it.</p>
+
+
+<h2>Why would someone use scaffolding?</h2>
+
+<p>Here's a typical scenario: You create a new database table during development and you'd like a quick way to insert some data
+into it to work with. Without scaffolding your choices are either to write some inserts using the command line or to use a
+database management tool like phpMyAdmin. With Code Igniter's scaffolding feature you can quickly add some data using its browser
+interface. And when you are through using the data you can easily delete it.</p>
+
+<h2>Setting a Secret Word</h2>
+
+<p>Before enabling scaffolding please take a moment to set a secret word. This word, when encountered in your URL,
+will launch the scaffolding interface, so please pick something obscure that no one is likely to guess.</p>
+
+<p>To set a secret word, open your <kbd>application/config/routes.php</kbd> file and look for this item:</p>
+
+<code>$route['scaffolding_trigger'] = '';</code>
+
+<p>Once you've found it add your own unique word.</p>
+
+<p class="important"><strong>Note:</strong> The scaffolding word can <strong>not</strong> start with an underscore.</p>
+
+
+<h2>Enabling Scaffolding</h2>
+
+<p>Note: The information on this page assumes you already know how <a href="controllers.html">controllers</a> work, and that you have
+a working one available. It also assumes you have configured Code Igniter to auto-connect to your <a href="../libraries/database/index.html">database</a>.
+If not, the information here won't be very relevant, so you are encouraged to go through those sections first.
+Lastly, it assumes you understand what a class constructor is. If not, read the last section of the <a href="controllers.html">controllers</a>
+page.</p>
+
+<p>To enable scaffolding you will initialize it in your constructor like this:</p>
+
+<code>
+&lt;?php<br />
+class Blog extends Controller {<br />
+<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function Blog()<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent::Controller();<br /><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<samp>$this->load->scaffolding(</samp><kbd>'table_name'</kbd>);</samp><br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
+}<br />
+?&gt;</code>
+
+<p>Where <kbd>table_name</kbd> is the name of the table (table, not database) you wish to work with.</p>
+
+<p>Once you've initialized scaffolding, you will access it with this URL prototype:
+
+<code>www.your-site.com/index.php/<var>class</var>/<dfn>secret_word</dfn>/</code>
+
+<p>For example, using a controller named <var>Blog</var>, and <dfn>abracadabra</dfn> as the secret word,
+you would access scaffolding like this:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/<dfn>abracadabra</dfn>/</code>
+
+<p>The scaffolding interface should be self-explanatory. You can add, edit or delete records.</p>
+
+
+<h2>A Final Note:</h2>
+
+<p>The scaffolding feature will only work with tables that contain a primary key, as this is information is needed to perform the various
+database functions.</p>
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="autoloader.html">Auto-loading Resources</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="routing.html">URI Routing</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/scripts.html b/user_guide/general/scripts.html
new file mode 100644
index 000000000..d0b5d26f6
--- /dev/null
+++ b/user_guide/general/scripts.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Scripts
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>The Scripts Folder</h1>
+
+<p>Inside the <dfn>application</dfn> directory you'll find a folder called <kbd>scripts</kbd>. Its purpose is
+to give you a place to store your own script includes or classes.</p>
+
+<h2>Loading a Script</h2>
+
+<p>Your scripts can be loaded in your controllers or views using the following function:</p>
+
+<code>$this->load->script('<var>name</var>');</code>
+
+<p>Where <var>name</var> is the file name of the script, without the .php file extension.</p>
+
+<p>For example, to load a file called <dfn>utilities.php</dfn> you would do this:</p>
+
+<code>$this->load->script('<var>utilities</var>');</code>
+
+<p>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.</p>
+
+<p class="important">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.</p>
+
+<h2>Loading Multiple Scripts</h2>
+
+<p>If you need to load more than one script you can specify them in an array, like this:</p>
+
+<code>$this->load->script( <samp>array(</samp>'<var>script1</var>', '<var>script2</var>', '<var>script3</var>'<samp>)</samp> );</code>
+
+<h2>Auto-loading Scripts</h2>
+
+<p>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 <var>application/config/autoload.php</var> file and adding
+the script to the autoload array.</p>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="plugins.html">Plugins</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="libraries.html">Loading Libraries</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/security.html b/user_guide/general/security.html
new file mode 100644
index 000000000..06287a23b
--- /dev/null
+++ b/user_guide/general/security.html
@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Security
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Security</h1>
+
+<p>This page describes some "best practices" regarding web security, and details
+Code Igniter's internal security features.</p>
+
+
+<h2>URI Security</h2>
+
+<p>Code Igniter is fairly restrictive regarding which characters it allows in your URI strings in order to help
+minimize the possibility that malicious data can be passed to your application. URIs may only contain the following:
+</p>
+
+<ul>
+<li>Alpha-numeric text</li>
+<li>Tilde: ~ </li>
+<li>Period: .</li>
+<li>Colon: :</li>
+<li>Underscore: _</li>
+<li>Dash: -</li>
+</ul>
+
+<h2>GET, POST, and COOKIE Data</h2>
+
+<p>GET data is simply disallowed by Code Igniter since the system utilizes URI segments rather than traditional URL query strings (unless
+you have the query string option enabled in your config file). The global GET
+array is <strong>unset</strong> by the Input class during system initialization.</p>
+
+<h2>Register_globals</h2>
+
+<p>During system initialization all global variables are unset, except those found in the $_POST and $_COOKIE arrays. The unsetting
+routine is effectively the same as register_globals = off.</p>
+
+
+<h2>magic_quotes_runtime</h2>
+
+<p>The magic_quotes_runtime directive is turned off during system initialization so that you don't have to remove slashes when
+retrieving data from your database.</p>
+
+<h1><br />Best Practices</h1>
+
+<p>Before accepting any data into your application, whether it be POST data from a form submission, COOKIE data, URI data,
+XML-RPC data, or even data from the SERVER array, you are encouraged to practice this three step approach:</p>
+
+<ol>
+
+<li>Filter the data as if it were tainted.</li>
+<li>Validate the data to ensure it conforms to the correct type, length, size, etc. (sometimes this step can replace step one)</li>
+<li>Escape the data before submitting it into your database.</li>
+</ol>
+
+Code Igniter provides the following functions to assist in this process:</p>
+
+<ul>
+
+<li><h2>XSS Filtering</h2>
+
+<p>Code Igniter comes with a Cross Site Scripting filter. This filter looks for commonly
+used techniques to embed malicious Javascript into your data, or other types of code that attempt to hijack cookies
+or do other malicious things. The XSS Filter is described <a href="../libraries/input.html">here</a>.
+</p>
+</li>
+
+<li><h2>Validate the data</h2>
+
+<p>Code Igniter has a <a href="../libraries/validation.html">Validation Class</a> that assists you in validating, filtering, and prepping
+your data.</p>
+</li>
+
+<li><h2>Escape all data before database insertion</h2>
+
+<p>Never insert information into your database without escaping it. Please see the section that discusses
+<a href="../libraries/database/queries.html">queries</a> for more information.</p>
+
+</li>
+
+</ul>
+
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="alternative_php.html">Alternative PHP</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="../libraries/benchmark.html">Benchmarking Class</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html
new file mode 100644
index 000000000..8daef51a6
--- /dev/null
+++ b/user_guide/general/urls.html
@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+URLS
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+
+<h1>Code Igniter URLs</h1>
+
+<p>By default, URLs in Code Igniter are designed to be search-engine and human friendly. Rather than using the standard "query string"
+approach to URLs that is synonymous with dynamic systems, Code Igniter uses a <strong>segment-based</strong> approach:</p>
+
+<code>www.your-site.com/<var>news</var>/<dfn>article</dfn>/<samp>my_article</samp></code>
+
+<p class="important"><strong>Note:</strong> Query string URLs can be optionally enabled, as described below.</p>
+
+<h2>URI Segments</h2>
+
+<p>The segments in the URL, in following with the Model-View-Controller approach, usually represent:</p>
+
+<code>www.your-site.com/<var>class</var>/<dfn>function</dfn>/<samp>ID</samp></code>
+
+<ol>
+<li>The first segment represents the controller <strong>class</strong> that should be invoked.</li>
+<li>The second segment represents the class <strong>function</strong>, or method, that should be called.</li>
+<li>The third, and any additional segments, represent the ID and any variables that will be passed to the controller.</p>
+</ol>
+
+<p>The <a href="../libraries/uri.html">URI Class</a> and the <a href="../helpers/url_helper.html">URL Helper</a>
+contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the
+<a href="routing.html">URI Routing</a> feature for more flexibility.</p>
+
+
+
+<h2>Removing the index.php file</h2>
+
+<p>By default, the <strong>index.php</strong> file will be included in your URLs:
+
+<code>www.your-site.com/<var>index.php</var>/news/article/my_article</code>
+
+<p>You can easily remove this file by using a .htaccess file with some simple rules. Here is an example
+ of such a file, using the "negative" method in which everything is redirected except the specified items:</p>
+
+<code>RewriteEngine on<br />
+RewriteCond $1 !^(index\.php|images|robots\.txt)<br />
+RewriteRule ^(.*)$ /index.php/$1 [L]</code>
+
+<p>In the above example, any HTTP request other than those for index.php, images, and robots.txt is treated as
+a request for your index.php file.</p>
+
+
+<h2>Adding a URL Suffix</h2>
+
+<p>In your <dfn>config/config.php</dfn> file you can specify a suffix that will be added to all URLs generated
+by Code Igniter. For example, if a URL is this:
+
+<code>www.your-site.com/index.php/products/view/shoes</code>
+
+<p>You can optionaally add a suffix, like <kbd>.html</kbd>, making the page appear to be of a certain type:</p>
+
+<code>www.your-site.com/index.php/products/view/shoes.html</code>
+
+
+<h2>Enabling Query Strings</h2>
+
+<p>In some cases you might prefer to use query strings URLs:</p>
+
+<code>index.php?c=products&m=view&id=345</code>
+
+<p>Code Igniter optionally supports this capability, which can be enabled in your <dfn>application/config.php</dfn> file. If you
+open your config file you'll see these items:</p>
+
+<code>$config['enable_query_strings'] = FALSE;<br />
+$config['controller_trigger'] = 'c';<br />
+$config['function_trigger'] = 'm';</code>
+
+<p>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:</p>
+
+<code>index.php?c=controller&m=method</code>
+
+<p class="important"><strong>Please note:</strong> 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
+segment based URLs.</p>
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="index.html">Getting Started</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="controllers.html">Controllers</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
new file mode 100644
index 000000000..14b03e58f
--- /dev/null
+++ b/user_guide/general/views.html
@@ -0,0 +1,249 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+
+<title>Code Igniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../scripts/nav.js"></script>
+<script type="text/javascript" src="../scripts/prototype.lite.js"></script>
+<script type="text/javascript" src="../scripts/moo.fx.js"></script>
+<script type="text/javascript">
+window.onload = function() {
+ myHeight = new fx.Height('nav', {duration: 400});
+ myHeight.hide();
+}
+</script>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='Rick Ellis' />
+<meta name='description' content='Code Igniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle.jpg" width="153" height="44" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>Code Igniter User Guide Version 1.4.0</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Full Table of Contents</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://www.codeigniter.com/">Code Igniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Views
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Views</h1>
+
+<p>A <dfn>view</dfn> is simply a web page, or a page fragment, like a header, footer, sidebar, etc.
+In fact, views can flexibly be embedded within other views (within other views, etc., etc.) if you need this type
+of hierarchy.</p>
+
+<p>Views are never called directly, they must be loaded by a <a href="controllers.html">controller</a>. Remember that in an MVC framework, the Controller acts as the
+traffic cop, so it is responsible for fetching a particular view. If you have not read the <a href="controllers.html">Controllers</a> page
+you should do so before continuing.</p>
+
+<p>Using the example controller you created in the <a href="controllers.html">controller</a> page, let's add a view to it.</p>
+
+<h2>Creating a View</h2>
+
+<p>Using your text editor, create a file called <dfn>blogview.php</dfn>, and put this in it:</p>
+
+<textarea class="textarea" style="width:100%" cols="50" rows="10">
+<html>
+<head>
+<title>My Blog</title>
+</head>
+<body>
+ <h1>Welcome to my Blog!</h1>
+</body>
+</html>
+</textarea>
+
+<p>Then save the file in your <dfn>application/views/</dfn> folder.</p>
+
+<h2>Loading a View</h2>
+
+<p>To load a particular view file you will use the following function:</p>
+
+<code>$this->load->view('<var>name</var>');</code>
+
+<p>Where <var>name</var> is the name of your view file, without the .php file extension.</p>
+
+<p>Now, open the controller file you made earlier called <dfn>blog.php</dfn>, and replace the echo statement with the view loading function:</p>
+
+
+<textarea class="textarea" style="width:100%" cols="50" rows="10">
+<?php
+class Blog extends Controller {
+
+ function index()
+ {
+ $this->load->view('blogview');
+ }
+}
+?>
+</textarea>
+
+
+<p>If you visit the your site using the URL you did earlier you should see your new view. The URL was similar to this:</p>
+
+<code>www.your-site.com/index.php/<var>blog</var>/</code>
+
+
+<h2>Adding Dynamic Data to the View</h2>
+
+<p>Data is passed from the controller to the view by way of an <strong>array</strong> or an <strong>object</strong> in the second
+parameter of the view loading function. Here is an example using an array:</p>
+
+<code>$data = array(<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'title' => 'My Title',<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'heading' => 'My Heading'<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'message' => 'My Message'<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />
+<br />
+$this->load->view('blogview', <var>$data</var>);</code>
+
+<p>And here's an example using an object:</p>
+
+<code>$data = new Someclass();<br />
+$this->load->view('blogview', <var>$data</var>);</code>
+
+<p>Note: If you use an object, the class variables will be turned into array elements.</p>
+
+
+<p>Let's try it with your controller file. Open it add this code:</p>
+
+<textarea class="textarea" style="width:100%" cols="50" rows="14">
+<?php
+class Blog extends Controller {
+
+ function index()
+ {
+ $data['title'] = "My Real Title";
+ $data['heading'] = "My Real Heading";
+
+ $this->load->view('blogview', $data);
+ }
+}
+?>
+</textarea>
+
+
+<p>Now open your view file and change the text to variables that correspond to the array keys in your data:</p>
+
+
+<textarea class="textarea" style="width:100%" cols="50" rows="10">
+<html>
+<head>
+<title><?=$title;?></title>
+</head>
+<body>
+ <h1><?=$heading;?></h1>
+</body>
+</html>
+</textarea>
+
+<p>Then load the page at the URL you've been using and you should see the variables replaced.</p>
+
+<p><strong>Note:</strong> Youl'll notice that in the example above we are using PHP's alternative syntax. If you
+are not familiar with it you can read about it <a href="alternative_php.html">here</a>.</p>
+
+<h2>Creating Loops</h2>
+
+<p>The data array you pass to your view files is not limited to simple variables. You can
+pass multi dimensional arrays, which can be looped to generate multiple rows. For example, if you
+pull data from your database it will typically be in the form of a multi-dimensional array.</p>
+
+<p>Here's a simple example. Add this to your controller:</p>
+
+<textarea class="textarea" style="width:100%" cols="50" rows="17">
+<?php
+class Blog extends Controller {
+
+ function index()
+ {
+ $data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');
+
+ $data['title'] = "My Real Title";
+ $data['heading'] = "My Real Heading";
+
+ $this->load->view('blogview', $data);
+ }
+}
+?>
+</textarea>
+
+
+<p>Now open your view file and create a loop:</p>
+
+
+<textarea class="textarea" style="width:100%" cols="50" rows="24">
+<html>
+<head>
+<title><?=$title;?></title>
+</head>
+<body>
+<h1><?=$heading;?></h1>
+
+<h3>My Todo List</h3>
+
+<ul>
+<?php foreach($todo_list as $item):?>
+
+<li><?=$item;?></li>
+
+<?php endforeach;?>
+</ul>
+
+
+</body>
+</html>
+</textarea>
+
+
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="controllers.html">Controllers</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="models.html">Models</a>
+<p>
+<p><a href="http://www.codeigniter.com">Code Igniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 &nbsp;&middot;&nbsp; <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file