From c644128fdd49a47d791240e0e38b54cd22412bc5 Mon Sep 17 00:00:00 2001
From: Derek Allard
-
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc. Lets you limit the number of rows you would like returned by the query:
+ Lets you limit the number of rows you would like returned by the query: The first parameter is the table name, the second is the where clause. You can also use the where() or orwhere() functions instead of passing
-the data to the second parameter of the function:
+the data to the second parameter of the function:
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc. CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.).
-The config file is located at:
+The config file is located at: application/config/database.php
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc. For information on each of these values please see the configuration page.
+ For information on each of these values please see the configuration page. Or you can submit your database values as a Data Source Name. DSNs must have this prototype:
+ Or you can submit your database values as a Data Source Name. DSNs must have this prototype: Note that if you use a DSN you will not be able to specify some of the default values like you can if you use a connection array. If you need to connect to more than one database simultaneously you can do so as follows:
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
+ CodeIgniter · Copyright © 2007 · Ellislab, Inc.
-
$this->db->limit(10);
@@ -565,7 +565,7 @@ $this->db->delete('mytable', array('id' => $id));
// WHERE id = $id
$this->db->where('id', $id);
-
@@ -603,7 +603,7 @@ Previous Topic: Query Helper Functions
Top of Page ·
User Guide Home ·
Next Topic: Transactions
-Database Configuration
$this->load->database($config);$dsn = 'dbdriver://username:password@hostname/database';
@@ -122,8 +122,6 @@ $this->load->database('$dsn');Connecting to Multiple Databases
$sql = "INSERT INTO table (title) VALUES(".$this->db->escape($title).")";
+$sql = "INSERT INTO table (title) VALUES(".$this->db->escape($title).")";
$sql = "INSERT INTO table (title) VALUES('".$this->db->escape_str($title)."')";
-
-$sql = "INSERT INTO table (title) VALUES('".$this->db->escape_str($title)."')";
@@ -134,7 +132,7 @@ Previous Topic: Connecting to your Database
Top of Page ·
User Guide Home ·
Next Topic: Query Results
-+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/database/results.html b/user_guide/database/results.html index 5b25015bf..f6c1be124 100644 --- a/user_guide/database/results.html +++ b/user_guide/database/results.html @@ -134,7 +134,7 @@ Query Results } -If you want a specific row returned you can submit the row number as a digit in the first parameter: +
If you want a specific row returned you can submit the row number as a digit in the first parameter:
$row = $query->row(5);
@@ -157,7 +157,7 @@ Query Results
- If you want a specific row returned you can submit the row number as a digit in the first parameter: +
If you want a specific row returned you can submit the row number as a digit in the first parameter:
$row = $query->row_array(5);
@@ -181,7 +181,7 @@ Query Results
-+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html index 6792e356f..13b96681a 100644 --- a/user_guide/database/table_data.html +++ b/user_guide/database/table_data.html @@ -110,7 +110,7 @@ Previous Topic: Transactions Top of Page · User Guide Home · Next Topic: Field Metadata -+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html index ecc5164d3..75aa4e887 100644 --- a/user_guide/database/transactions.html +++ b/user_guide/database/transactions.html @@ -122,7 +122,7 @@ if ($this->db->trans_status() === FALSE)Transactions are enabled automatically the moment you use $this->db->trans_start(). If you would like to disable transactions you -can do so using $this->db->trans_off(): +can do so using $this->db->trans_off():
$this->db->trans_off()
@@ -138,7 +138,7 @@ $this->db->trans_complete();
Test Mode
You can optionally put the transaction system into "test mode", which will cause your queries to be rolled back -- even if the queries produce a valid result.
-To use test mode simply set the first parameter in the $this->db->trans_start() function to TRUE:
+To use test mode simply set the first parameter in the $this->db->trans_start() function to TRUE:
$this->db->trans_start(TRUE); // Query will be rolled back
@@ -190,7 +190,7 @@ Previous Topic: Field MetaData
Top of Page ·
User Guide Home ·
Next Topic: Table Metadata
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html
index a7601e85f..7de0ea3ed 100644
--- a/user_guide/database/utilities.html
+++ b/user_guide/database/utilities.html
@@ -205,7 +205,7 @@ echo $this->dbutil->csv_from_result($query);
The second and third parameters allows you to
-set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:
+set the delimiter and newline character. By default tabs are used as the delimiter and "\n" is used as a new line. Example:
$delimiter = ",";
@@ -330,7 +330,7 @@ Previous Topic: DB Caching Class
Top of Page ·
User Guide Home ·
Next Topic: Email Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html
index 2b088919e..7498587ca 100644
--- a/user_guide/general/alternative_php.html
+++ b/user_guide/general/alternative_php.html
@@ -144,7 +144,7 @@ Previous Topic: Managing ApplicationsTop of Page ·
User Guide Home ·
Next Topic: Security
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html
index f6ae7ffa9..58f2b06a7 100644
--- a/user_guide/general/ancillary_classes.html
+++ b/user_guide/general/ancillary_classes.html
@@ -114,7 +114,7 @@ Previous Topic: Creating Core Libra
Top of Page ·
User Guide Home ·
Next Topic: Auto-loading Resources
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html
index f3d474f2e..39a0ce657 100644
--- a/user_guide/general/autoloader.html
+++ b/user_guide/general/autoloader.html
@@ -97,7 +97,7 @@ Previous Topic: Hooks - Extending the Core
Top of Page ·
User Guide Home ·
Next Topic: Scaffolding
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html
index 8756f7c1d..a881f2d42 100644
--- a/user_guide/general/caching.html
+++ b/user_guide/general/caching.html
@@ -63,11 +63,11 @@ Page Caching
Web Page Caching
-CodeIgniter lets you cache your pages in order to achieve maximum performance.
+
CodeIgniter lets you cache your pages in order to achieve maximum performance.
-Although CodeIgniter is quite fast, the amount of dynamic information you display in your pages will correlate directly to the
+Although CodeIgniter 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.
+By caching your pages, since they are saved in their fully rendered state, you can achieve performance that nears that of static web pages.
How Does Caching Work?
@@ -111,7 +111,7 @@ Previous Topic: Error Handling
Top of Page ·
User Guide Home ·
Next Topic: Profiling Your Application
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html
index c61660d34..5d83edcd6 100644
--- a/user_guide/general/controllers.html
+++ b/user_guide/general/controllers.html
@@ -121,7 +121,7 @@ class Blog extends Controller {
If you did it right, you should see Hello World!.
-Note: Class names must start with an uppercase letter. In other words, this is valid:
+
Note: Class names must start with an uppercase letter. In other words, this is valid:
<?php
class Blog extends Controller {
@@ -182,7 +182,7 @@ class Blog extends Controller {
If your URI contains more then two segments they will be passed to your function as parameters.
-For example, lets say you have a URI like this:
+
For example, lets say you have a URI like this:
www.your-site.com/index.php/products/shoes/sandals/123
@@ -258,7 +258,7 @@ allowing you to define your own function routing rules.
CodeIgniter has an output class that takes care of sending your final rendered data to the web browser automatically. More information on this can be found in the
Views and Output class pages. In some cases, however, you might want to
post-process the finalized data in some way and send it to the browser yourself. CodeIgniter permits you to
-add a function named _output() to your controller that will receive the finalized output data.
+add a function named _output() to your controller that will receive the finalized output data.
Important: If your controller contains a function named _output(), it will always
be called by the output class instead of echoing the finalized data directly. The first parameter of the function will contain the finalized output.
@@ -317,12 +317,10 @@ called if the URL contains only the sub-folder. Simply name your default contro
application/config/routes.php file
-CodeIgniter also permits you to remap your URIs using its URI Routing feature.
+
CodeIgniter also permits you to remap your URIs using its URI Routing feature.
-
-
-Class Constructors
+Class Constructors
If you intend to use a constructor in any of your Controllers, you MUST place the following line of code in it:
@@ -426,8 +424,7 @@ Previous Topic: CodeIgniter URLs
Top of Page ·
User Guide Home ·
Next Topic: Views
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html
index 2b476e58b..fa467cb2b 100644
--- a/user_guide/general/core_classes.html
+++ b/user_guide/general/core_classes.html
@@ -166,7 +166,7 @@ Previous Topic: Creating Your Own L
Top of Page ·
User Guide Home ·
Next Topic: Hooks - Extending the Core
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html
index 020f7bed5..b3eaf3d7f 100644
--- a/user_guide/general/creating_libraries.html
+++ b/user_guide/general/creating_libraries.html
@@ -68,7 +68,7 @@ your own libraries within your application/libraries directory in ord
and the global framework resources.
As an added bonus, CodeIgniter permits your libraries to extend native classes if you simply need to add some functionality
-to an existing library. Or you can even replace native libraries just by placing identically named versions in your application/libraries folder.
+to an existing library. Or you can even replace native libraries just by placing identically named versions in your application/libraries folder.
In summary:
@@ -266,7 +266,7 @@ to load the example above, which extends the Email class, you will use:
$this->load->library('email');
Once loaded you will use the class variable as you normally would for the class you are extending. In the case of
-the email class all calls will use:
+the email class all calls will use:
$this->email->some_function();
@@ -293,7 +293,7 @@ Previous Topic: Using CodeIgniter Libraries<
Top of Page ·
User Guide Home ·
Next Topic: Creating Core System Classes
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html
index 9ac1618da..97aef01b2 100644
--- a/user_guide/general/credits.html
+++ b/user_guide/general/credits.html
@@ -87,8 +87,7 @@ Previous Topic: Change Log
Top of Page ·
User Guide Home ·
Next Topic: Downloading CodeIgniter
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html
index 650008114..d78dd4947 100644
--- a/user_guide/general/errors.html
+++ b/user_guide/general/errors.html
@@ -134,7 +134,7 @@ Previous Topic: URI Routing
Top of Page ·
User Guide Home ·
Next Topic: Page Caching
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html
index 0aba208aa..a91c8c21f 100644
--- a/user_guide/general/helpers.html
+++ b/user_guide/general/helpers.html
@@ -138,7 +138,7 @@ Previous Topic: Models
Top of Page ·
User Guide Home ·
Next Topic: Plugins
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
index c864c1edb..0776e32c8 100644
--- a/user_guide/general/hooks.html
+++ b/user_guide/general/hooks.html
@@ -104,7 +104,7 @@ The following items should be defined in your associative hook array:
Multiple Calls to the Same Hook
-If want to use the same hook point with more then one script, simply make your array declaration multi-dimensional, like this:
+
If want to use the same hook point with more then one script, simply make your array declaration multi-dimensional, like this:
$hook['pre_controller'][] = array(
@@ -185,7 +185,7 @@ Previous Topic: Creating Core Classes
Top of Page ·
User Guide Home ·
Next Topic: Auto-loading Resources
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/index.html b/user_guide/general/index.html
index bf9b4ddc6..2d5148b32 100644
--- a/user_guide/general/index.html
+++ b/user_guide/general/index.html
@@ -91,7 +91,7 @@ Previous Topic: Architectural Goals<
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter URLs
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html
index 38c9987bb..4efd5eefe 100644
--- a/user_guide/general/libraries.html
+++ b/user_guide/general/libraries.html
@@ -91,7 +91,7 @@ Previous Topic: Plugins
Top of Page ·
User Guide Home ·
Next Topic: Creating Libraries
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html
index 103127fb9..836f0c86f 100644
--- a/user_guide/general/managing_apps.html
+++ b/user_guide/general/managing_apps.html
@@ -89,7 +89,7 @@ put all of the directories located inside your application folder int
own sub-folder.
For example, let's say you want to create two applications, "foo" and "bar". You will structure your
-application folder like this:
+application folder like this:
system/application/foo/
system/application/foo/config/
@@ -130,8 +130,7 @@ Previous Topic: Profiling Your Application
Top of Page ·
User Guide Home ·
Next Topic: Alternative PHP Syntax
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/models.html b/user_guide/general/models.html
index c1832cca6..6758ceb86 100644
--- a/user_guide/general/models.html
+++ b/user_guide/general/models.html
@@ -251,7 +251,7 @@ Previous Topic: Views
Top of Page ·
User Guide Home ·
Next Topic: Helpers
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/plugins.html b/user_guide/general/plugins.html
index ef299aa1b..2fde9272e 100644
--- a/user_guide/general/plugins.html
+++ b/user_guide/general/plugins.html
@@ -124,7 +124,7 @@ Previous Topic: Helpers
Top of Page ·
User Guide Home ·
Next Topic: Using Libraries
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html
index 719501338..a73f00987 100644
--- a/user_guide/general/profiling.html
+++ b/user_guide/general/profiling.html
@@ -111,7 +111,7 @@ Previous Topic: Caching
Top of Page ·
User Guide Home ·
Next Topic: Managing Applications
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html
index 963f6b051..9680cbd55 100644
--- a/user_guide/general/quick_reference.html
+++ b/user_guide/general/quick_reference.html
@@ -62,7 +62,7 @@ Quick Reference Chart
Quick Reference Chart
-For a PDF version of this chart, click here.
+
For a PDF version of this chart, click here.
![](../images/ci_quick_ref.png)
@@ -74,8 +74,7 @@ Quick Reference Chart
Top of Page ·
User Guide Home
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html
index e92b51960..1aa0d78a1 100644
--- a/user_guide/general/requirements.html
+++ b/user_guide/general/requirements.html
@@ -79,8 +79,7 @@ Server Requirements
Top of Page ·
User Guide Home ·
Next Topic: License Agreement
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html
index c4af428a0..2cd0d2f49 100644
--- a/user_guide/general/routing.html
+++ b/user_guide/general/routing.html
@@ -86,7 +86,7 @@ To overcome this, CodeIgniter allows you to remap the URI handler.
Setting your own routing rules
Routing rules are defined in your application/config/routes.php file. In it you'll see an array called $route that
-permits you to specify your own routing criteria. Routes can either be specified using wildcards or Regular Expressions
+permits you to specify your own routing criteria. Routes can either be specified using wildcards or Regular Expressions
Wildcards
@@ -172,7 +172,7 @@ Previous Topic: Scaffolding
Top of Page ·
User Guide Home ·
Next Topic: Error Handling
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html
index 4f23d3fed..125732e87 100644
--- a/user_guide/general/scaffolding.html
+++ b/user_guide/general/scaffolding.html
@@ -116,7 +116,7 @@ class Blog extends Controller {
Where table_name is the name of the table (table, not database) you wish to work with.
-Once you've initialized scaffolding, you will access it with this URL prototype:
+
Once you've initialized scaffolding, you will access it with this URL prototype:
www.your-site.com/index.php/class/secret_word/
@@ -145,7 +145,7 @@ Previous Topic: Auto-loading Resources
Top of Page ·
User Guide Home ·
Next Topic: URI Routing
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/security.html b/user_guide/general/security.html
index fdba2dfc9..24bfe1c46 100644
--- a/user_guide/general/security.html
+++ b/user_guide/general/security.html
@@ -151,7 +151,7 @@ Previous Topic: Alternative PHP
Top of Page ·
User Guide Home ·
Next Topic: Benchmarking Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html
index 4df37eebc..21031affb 100644
--- a/user_guide/general/urls.html
+++ b/user_guide/general/urls.html
@@ -90,7 +90,7 @@ contain functions that make it easy to work with your URI data. In addition, yo
Removing the index.php file
-By default, the index.php file will be included in your URLs:
+
By default, the index.php file will be included in your URLs:
www.your-site.com/index.php/news/article/my_article
@@ -108,7 +108,7 @@ a request for your index.php file.
Adding a URL Suffix
In your config/config.php file you can specify a suffix that will be added to all URLs generated
-by CodeIgniter. For example, if a URL is this:
+by CodeIgniter. For example, if a URL is this:
www.your-site.com/index.php/products/view/shoes
@@ -151,7 +151,7 @@ Previous Topic: Getting Started
Top of Page ·
User Guide Home ·
Next Topic: Controllers
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
index 8adfc6736..737146dbb 100644
--- a/user_guide/general/views.html
+++ b/user_guide/general/views.html
@@ -77,14 +77,14 @@ you should do so before continuing.
Using your text editor, create a file called blogview.php, and put this in it:
Then save the file in your application/views/ folder.
@@ -169,14 +169,14 @@ class Blog extends Controller {
Then load the page at the URL you've been using and you should see the variables replaced.
@@ -214,26 +214,26 @@ class Blog extends Controller {
@@ -249,7 +249,7 @@ Previous Topic: Controllers
Top of Page ·
User Guide Home ·
Next Topic: Models
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html
index 893dcaf97..7057c3361 100644
--- a/user_guide/helpers/array_helper.html
+++ b/user_guide/helpers/array_helper.html
@@ -117,7 +117,7 @@ Previous Topic: Zip Encoding Class
Top of Page ·
User Guide Home ·
Next Topic: Cookie Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html
index bee6f3e08..a81a498df 100644
--- a/user_guide/helpers/cookie_helper.html
+++ b/user_guide/helpers/cookie_helper.html
@@ -149,7 +149,7 @@ Previous Topic: Array Helper
Top of Page ·
User Guide Home ·
Next Topic: Date Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html
index b9c48aa5e..00f00ad71 100644
--- a/user_guide/helpers/date_helper.html
+++ b/user_guide/helpers/date_helper.html
@@ -172,7 +172,7 @@ $unix = mysql_to_unix($mysql);
This can be useful if you need to display a date in a form field for submission.
The time can be formatted with or without seconds, and it can be set to European or US format. If only
-the timestamp is submitted it will return the time without seconds formatted for the U.S. Examples:
+the timestamp is submitted it will return the time without seconds formatted for the U.S. Examples:
$now = time();
@@ -363,7 +363,7 @@ Previous Topic: Cookie Helper
Top of Page ·
User Guide Home ·
Next Topic: Directory Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/directory_helper.html b/user_guide/helpers/directory_helper.html
index d0be8f6ff..8f1027a83 100644
--- a/user_guide/helpers/directory_helper.html
+++ b/user_guide/helpers/directory_helper.html
@@ -137,7 +137,7 @@ Previous Topic: Date Helper
Top of Page ·
User Guide Home ·
Next Topic: Download Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/download_helper.html b/user_guide/helpers/download_helper.html
index 3a0e25261..bd5b7483a 100644
--- a/user_guide/helpers/download_helper.html
+++ b/user_guide/helpers/download_helper.html
@@ -110,7 +110,7 @@ Previous Topic: Directory Helper
Top of Page ·
User Guide Home ·
Next Topic: File Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index bebcc90b4..3139569af 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -103,7 +103,7 @@ else
echo 'File written!';
}
-You can optionally set the write mode via the third parameter:
+
You can optionally set the write mode via the third parameter:
write_file('./path/to/file.php', $data, 'r+');
@@ -146,7 +146,7 @@ Previous Topic: Directory Helper
Top of Page ·
User Guide Home ·
Next Topic: Form Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html
index d1eef8d8b..572f2a205 100644
--- a/user_guide/helpers/form_helper.html
+++ b/user_guide/helpers/form_helper.html
@@ -155,7 +155,7 @@ echo form_hidden($data);
form_input()
Lets you generate a standard text input field. You can minimally pass the field name and value in the first
-and second parameter:
+and second parameter:
echo form_input('username', 'johndoe');
@@ -176,7 +176,7 @@ echo form_input($data);
<input type="text" name="username" id="username" value="johndoe" maxlength="100" size="50" style="width:50%" />
If you would like your form to contain some additional data, like JavaScript, you can pass it as a string in the
-third parameter:
+third parameter:
$js = 'onClick="some_function()"';
@@ -203,7 +203,7 @@ example, you will instead specify "rows" and "cols".
Lets you create a standard drop-down field. The first parameter will contain the name of the field,
the second parameter will contain an associative array of options, and the third parameter will contain the
-value you wish to be selected. Example:
+value you wish to be selected. Example:
$options = array(
'small' => 'Small Shirt',
@@ -225,7 +225,7 @@ echo form_dropdown('shirts', $options, 'large');
If you would like the opening <select> to contain additional data, like JavaScript, you can pass it as a string in the
-fourth parameter:
+fourth parameter:
$js = 'onChange="some_function()"';
@@ -234,7 +234,7 @@ echo form_dropdown('shirts', $options, 'large', $js);
form_checkbox()
-Lets you generate a checkbox field. Simple example:
+
Lets you generate a checkbox field. Simple example:
echo form_checkbox('newsletter', 'accept', TRUE);
@@ -261,7 +261,7 @@ echo form_checkbox($data);
<input type="checkbox" name="newsletter" id="newsletter" value="accept" checked="checked" style="margin:10px" />
As with other functions, if you would like the tag to contain additional data, like JavaScript, you can pass it as a string in the
-fourth parameter:
+fourth parameter:
$js = 'onClick="some_function()"';
@@ -335,7 +335,7 @@ Previous Topic: File Helper
Top of Page ·
User Guide Home ·
Next Topic: HTML Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index 2b4196055..620cb1046 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -227,7 +227,7 @@ Previous Topic: Form Helper
Top of Page ·
User Guide Home ·
Next Topic: Inflector Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/index.html b/user_guide/helpers/index.html
index ba067df92..1c8935d23 100644
--- a/user_guide/helpers/index.html
+++ b/user_guide/helpers/index.html
@@ -123,7 +123,7 @@ This is done by opening the application/config/autoload.php file and
diff --git a/user_guide/helpers/inflector_helper.html b/user_guide/helpers/inflector_helper.html
index 8c7a26d47..2a4ee559f 100644
--- a/user_guide/helpers/inflector_helper.html
+++ b/user_guide/helpers/inflector_helper.html
@@ -145,7 +145,7 @@ Previous Topic: HTML Helper
Top of Page ·
User Guide Home ·
Next Topic: Security Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/security_helper.html b/user_guide/helpers/security_helper.html
index 2e603afe7..7ba8a83cf 100644
--- a/user_guide/helpers/security_helper.html
+++ b/user_guide/helpers/security_helper.html
@@ -123,7 +123,7 @@ Previous Topic: Inflector Helper
Top of Page ·
User Guide Home ·
Next Topic: Smiley Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html
index d690749ed..1603e1659 100644
--- a/user_guide/helpers/smiley_helper.html
+++ b/user_guide/helpers/smiley_helper.html
@@ -132,25 +132,25 @@ class Smileys extends Controller {
@@ -200,7 +200,7 @@ Previous Topic: Security Helper
Top of Page ·
User Guide Home ·
Next Topic: String Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html
index c5be715a9..0858b78e9 100644
--- a/user_guide/helpers/string_helper.html
+++ b/user_guide/helpers/string_helper.html
@@ -95,7 +95,7 @@ Returns a fixed length 33 character string.
alternator()
-Allows two or more items to be alternated between, when cycling through a loop. Example:
+
Allows two or more items to be alternated between, when cycling through a loop. Example:
for ($i = 0; $i < 10; $i++)
{
@@ -136,7 +136,7 @@ Previous Topic: Smiley Helper
Top of Page ·
User Guide Home ·
Next Topic: Text Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html
index e20a07cc3..260fad4a4 100644
--- a/user_guide/helpers/text_helper.html
+++ b/user_guide/helpers/text_helper.html
@@ -189,7 +189,7 @@ Previous Topic: String Helper
Top of Page ·
User Guide Home ·
Next Topic: Typography Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/typography_helper.html b/user_guide/helpers/typography_helper.html
index 5bcd2e3f9..48cae2d3f 100644
--- a/user_guide/helpers/typography_helper.html
+++ b/user_guide/helpers/typography_helper.html
@@ -121,7 +121,7 @@ Previous Topic: Text Helper
Top of Page ·
User Guide Home ·
Next Topic: URL Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html
index 7d54867e1..f2dc765b8 100644
--- a/user_guide/helpers/url_helper.html
+++ b/user_guide/helpers/url_helper.html
@@ -263,7 +263,7 @@ Previous Topic: Typography HelperTop of Page ·
User Guide Home ·
Next Topic: XML Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html
index 35dd88686..5fdd631f2 100644
--- a/user_guide/helpers/xml_helper.html
+++ b/user_guide/helpers/xml_helper.html
@@ -102,7 +102,7 @@ Previous Topic: URL Helper
·
Top of Page ·
User Guide Home
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/index.html b/user_guide/index.html
index 15ecf1ea5..6c61d1263 100644
--- a/user_guide/index.html
+++ b/user_guide/index.html
@@ -97,7 +97,7 @@ then read the Getting Started page.
diff --git a/user_guide/installation/downloads.html b/user_guide/installation/downloads.html
index 58eefac00..83037a94c 100644
--- a/user_guide/installation/downloads.html
+++ b/user_guide/installation/downloads.html
@@ -93,8 +93,7 @@ Previous Topic: Credits
Top of Page ·
User Guide Home ·
Next Topic: Installation Instructions
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html
index edfa8b53b..ba4579b99 100644
--- a/user_guide/installation/index.html
+++ b/user_guide/installation/index.html
@@ -93,7 +93,7 @@ Previous Topic: Credits
Top of Page ·
User Guide Home ·
Next Topic: Upgrading from a Previous Version
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/troubleshooting.html b/user_guide/installation/troubleshooting.html
index 9813ef2ab..cde190b79 100644
--- a/user_guide/installation/troubleshooting.html
+++ b/user_guide/installation/troubleshooting.html
@@ -87,8 +87,7 @@ Previous Topic: Upgrading Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_120.html b/user_guide/installation/upgrade_120.html
index a3f554c42..048716983 100644
--- a/user_guide/installation/upgrade_120.html
+++ b/user_guide/installation/upgrade_120.html
@@ -89,8 +89,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_130.html b/user_guide/installation/upgrade_130.html
index f08c8a11b..db59e714c 100644
--- a/user_guide/installation/upgrade_130.html
+++ b/user_guide/installation/upgrade_130.html
@@ -200,8 +200,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_131.html b/user_guide/installation/upgrade_131.html
index 812f5e410..d8dbcef65 100644
--- a/user_guide/installation/upgrade_131.html
+++ b/user_guide/installation/upgrade_131.html
@@ -99,8 +99,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_132.html b/user_guide/installation/upgrade_132.html
index 3ae6a83a8..1e9aa0a08 100644
--- a/user_guide/installation/upgrade_132.html
+++ b/user_guide/installation/upgrade_132.html
@@ -97,8 +97,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_133.html b/user_guide/installation/upgrade_133.html
index 3c0cea6d3..654b6415d 100644
--- a/user_guide/installation/upgrade_133.html
+++ b/user_guide/installation/upgrade_133.html
@@ -91,7 +91,7 @@ have not upgraded to that version please do so first.
As of version 1.3.3, CodeIgniter does not connect automatically to your database when a model is loaded. This
allows you greater flexibility in determining which databases you would like used with your models. If your application is not connecting
to your database prior to a model being loaded you will have to update your code. There are several options for connecting,
-as described here.
+as described here.
Step 3: Update your user guide
@@ -109,8 +109,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_140.html b/user_guide/installation/upgrade_140.html
index 0a5158981..ea8f5a03c 100644
--- a/user_guide/installation/upgrade_140.html
+++ b/user_guide/installation/upgrade_140.html
@@ -142,8 +142,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_141.html b/user_guide/installation/upgrade_141.html
index 0324508a0..614f72784 100644
--- a/user_guide/installation/upgrade_141.html
+++ b/user_guide/installation/upgrade_141.html
@@ -146,8 +146,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html
index 13948655e..fcfdf4c63 100644
--- a/user_guide/installation/upgrade_150.html
+++ b/user_guide/installation/upgrade_150.html
@@ -71,7 +71,7 @@ have not upgraded to that version please do so first.
Step 1: Update your CodeIgniter files
-Replace these files and directories in your "system" folder with the new versions:
+
Replace these files and directories in your "system" folder with the new versions:
@@ -175,8 +175,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_152.html b/user_guide/installation/upgrade_152.html
index 853e5ce35..b65aebe30 100644
--- a/user_guide/installation/upgrade_152.html
+++ b/user_guide/installation/upgrade_152.html
@@ -71,7 +71,7 @@ have not upgraded to that version please do so first.
Step 1: Update your CodeIgniter files
-Replace these files and directories in your "system" folder with the new versions:
+
Replace these files and directories in your "system" folder with the new versions:
@@ -108,8 +108,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_153.html b/user_guide/installation/upgrade_153.html
index 2e9995799..1e6d1483a 100644
--- a/user_guide/installation/upgrade_153.html
+++ b/user_guide/installation/upgrade_153.html
@@ -68,7 +68,7 @@ Upgrading from 1.5.0 to 1.5.2
Step 1: Update your CodeIgniter files
-Replace these files and directories in your "system" folder with the new versions:
+
Replace these files and directories in your "system" folder with the new versions:
@@ -98,8 +98,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrade_b11.html b/user_guide/installation/upgrade_b11.html
index 793cd2e75..9d2a0c62f 100644
--- a/user_guide/installation/upgrade_b11.html
+++ b/user_guide/installation/upgrade_b11.html
@@ -141,8 +141,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter at a Glance
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html
index 2efa11511..ffe9bf89c 100644
--- a/user_guide/installation/upgrading.html
+++ b/user_guide/installation/upgrading.html
@@ -90,8 +90,7 @@ Previous Topic: Installation Instructions
Top of Page ·
User Guide Home ·
Next Topic: Troubleshooting
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html
index d92f0730a..3568f7726 100644
--- a/user_guide/libraries/benchmark.html
+++ b/user_guide/libraries/benchmark.html
@@ -88,7 +88,7 @@ timing of the entire system execution to be shown.
Using the Benchmark Class
-The Benchmark class can be used within your controllers, views, or your Models. The process for usage is this:
+
The Benchmark class can be used within your controllers, views, or your Models. The process for usage is this:
- Mark a start point
@@ -194,7 +194,7 @@ Previous Topic: Security
Top of Page ·
User Guide Home ·
Next Topic: Calendaring Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html
index c9779081f..01b90fbd0 100644
--- a/user_guide/libraries/calendar.html
+++ b/user_guide/libraries/calendar.html
@@ -246,7 +246,7 @@ Previous Topic: Benchmarking Class
Top of Page ·
User Guide Home ·
Next Topic: Config Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html
index 350831e0d..5ab85cc14 100644
--- a/user_guide/libraries/config.html
+++ b/user_guide/libraries/config.html
@@ -99,7 +99,7 @@ so you will only need to load a config file if you have created your own.
If you need to load multiple config files normally they will be merged into one master config array. Name collisions can occur, however, if
you have identically named array indexes in different config files. To avoid collisions you can set the second parameter to TRUE
-and each config file will be stored in an array index corresponding to the name of the config file. Example:
+and each config file will be stored in an array index corresponding to the name of the config file. Example:
// Stored in an array with this prototype: $this->config['blog_settings'] = $config
@@ -111,10 +111,8 @@ $this->config->load('blog_settings', TRUE);
$this->config->load('blog_settings', FALSE, TRUE);
-
-
-- Auto-loading
+- Auto-loading
If you find that you need a particular config file globally, you can have it loaded automatically by the system. To do this,
open the autoload.php file, located at application/config/autoload.php, and add your config file as
@@ -136,7 +134,7 @@ indicated in the file.
The function returns FALSE (boolean) if the item you are trying to fetch does not exist.
If you are using the second parameter of the $this->config->load function in order to assign your config items to a specific index
-you can retrieve it by specifying the index name in the second parameter of the $this->config->item() function. Example:
+you can retrieve it by specifying the index name in the second parameter of the $this->config->item() function. Example:
// Loads a config file named blog_settings.php and assigns it to an index named "blog_settings"
@@ -180,7 +178,7 @@ Previous Topic: Calendaring Class
Top of Page ·
User Guide Home ·
Next Topic: Database Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html
index 190dadbdb..cd163c63d 100644
--- a/user_guide/libraries/email.html
+++ b/user_guide/libraries/email.html
@@ -271,7 +271,7 @@ $this->email->send();
If you have word wrapping enabled (recommended to comply with RFC 822) and you have a very long link in your email it can
get wrapped too, causing it to become un-clickable by the person receiving it. CodeIgniter lets you manually override
-word wrapping within part of your message like this:
+word wrapping within part of your message like this:
The text of your email that
gets wrapped normally.
@@ -281,7 +281,7 @@ gets wrapped normally.
More text that will be
wrapped normally.
-Place the item you do not want word-wrapped between: {unwrap} {/unwrap}
+
Place the item you do not want word-wrapped between: {unwrap} {/unwrap}
@@ -295,7 +295,7 @@ Previous Topic: Database Class
Top of Page ·
User Guide Home ·
Next Topic: Encryption Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index e3a9762b5..c197dc5de 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -140,7 +140,7 @@ $plaintext_string = $this->encrypt->decode($encrypted_string);
$this->encrypt->set_cipher();
-Permits you to set an Mcrypt cipher. By default it uses MCRYPT_RIJNDAEL_256. Example:
+
Permits you to set an Mcrypt cipher. By default it uses MCRYPT_RIJNDAEL_256. Example:
$this->encrypt->set_cipher(MCRYPT_BLOWFISH);
Please visit php.net for a list of available ciphers.
@@ -150,7 +150,7 @@ $plaintext_string = $this->encrypt->decode($encrypted_string);
$this->encrypt->set_mode();
-Permits you to set an Mcrypt mode. By default it uses MCRYPT_MODE_ECB. Example:
+
Permits you to set an Mcrypt mode. By default it uses MCRYPT_MODE_ECB. Example:
$this->encrypt->set_mode(MCRYPT_MODE_CFB);
Please visit php.net for a list of available modes.
@@ -179,7 +179,7 @@ Previous Topic: Email Class
Top of Page ·
User Guide Home ·
Next Topic: File Uploading Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 21fd2a6ba..d9a993a74 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -89,26 +89,27 @@ preferences, restricting the type and size of the files.
folder:
-
You'll notice we are using a form helper to create the opening form tag. File uploads require a multipart form, so the helper
creates the proper syntax for you. You'll also notice we have an $error variable. This is so we can show error messages in the event
@@ -120,24 +121,24 @@ the user does something wrong.
Using a text editor, create a form called upload_success.php.
In it, place this code and save it to your applications/views/ folder:
-
-
-Upload Form
-
-
+<html>
+<head>
+<title>Upload Form</title>
+</head>
+<body>
-Your file was successfully uploaded!
+<h3>Your file was successfully uploaded!</h3>
-
- $value):?>
-- =$item;?>: =$value;?>
-
-
+<ul>
+<?php foreach($upload_data as $item => $value):?>
+<li><?=$item;?>: <?=$value;?></li>
+<?php endforeach; ?>
+</ul>
-=anchor('upload', 'Upload Another File!'); ?>
+<p><?=anchor('upload', 'Upload Another File!'); ?></p>
-
-
+</body>
+</html>
The Controller
@@ -428,7 +429,7 @@ Previous Topic: Download Helper
Top of Page ·
User Guide Home ·
Next Topic: FTP Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html
index 9db0021a7..c9d1888ad 100644
--- a/user_guide/libraries/ftp.html
+++ b/user_guide/libraries/ftp.html
@@ -300,7 +300,7 @@ Previous Topic: File Uploading ClassTop of Page ·
User Guide Home ·
Next Topic: HTML Table Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html
index 04bd46f8c..d3fbe27a4 100644
--- a/user_guide/libraries/image_lib.html
+++ b/user_guide/libraries/image_lib.html
@@ -288,14 +288,14 @@ preferences have no effect on cropping. The "availability" column indicates whi
X
-
+
x_axis
None
None
Sets the X coordinate in pixels for image cropping. For example, a setting of 30 will crop an image 30 pixels from the left.
C
-
+
y_axis
None
None
@@ -661,7 +661,7 @@ Previous Topic: HTML Table Class
Top of Page ·
User Guide Home ·
Next Topic: Input Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html
index f810029ab..b6747135c 100644
--- a/user_guide/libraries/input.html
+++ b/user_guide/libraries/input.html
@@ -108,7 +108,7 @@ Note: This function should only be used to deal with data upon submission. It's
$data = $this->input->xss_clean($data);
If you want the filter to run automatically every time it encounters POST or COOKIE data you can enable it by opening your
-application/config/config.php file and setting this:
+application/config/config.php file and setting this:
$config['global_xss_filtering'] = TRUE;
@@ -122,7 +122,7 @@ Note: This function should only be used to deal with data upon submission. It's
CodeIgniter comes with three helper functions that let you fetch POST, COOKIE or SERVER items. The main advantage of using the provided
functions rather then fetching an item directly ($_POST['something']) is that the functions will check to see if the item is set and
return false (boolean) if not. This lets you conveniently use data without having to test whether an item exists first.
-In other words, normally you might do something like this:
+In other words, normally you might do something like this:
if ( ! isset($_POST['something']))
@@ -211,7 +211,7 @@ Previous Topic: Image Manipulation Class
Top of Page ·
User Guide Home ·
Next Topic: Loader Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html
index 71dc0b976..6a74cc963 100644
--- a/user_guide/libraries/language.html
+++ b/user_guide/libraries/language.html
@@ -132,7 +132,7 @@ Previous Topic: Loader Class
Top of Page ·
User Guide Home ·
Next Topic: Output Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html
index 98bfd1b07..4b4ec4ceb 100644
--- a/user_guide/libraries/loader.html
+++ b/user_guide/libraries/loader.html
@@ -85,7 +85,7 @@ Note: We use the terms "class" and "library" interchangeably.
Each library is described in detail in its own page, so please read the information regarding each one you would like to use.
-Parameters can be passed to the library via an array in the second parameter.
+
Parameters can be passed to the library via an array in the second parameter.
$this->load->view('file_name', $data, true/false)
@@ -164,7 +164,7 @@ Previous Topic: Input Class
Top of Page ·
User Guide Home ·
Next Topic: Language Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html
index 40858751e..10d59026b 100644
--- a/user_guide/libraries/output.html
+++ b/user_guide/libraries/output.html
@@ -75,7 +75,7 @@ It is possible, however, for you to manually intervene with the output if you ne
$this->output->set_output();
-Permits you to manually set the final output string. Usage example:
+
Permits you to manually set the final output string. Usage example:
$this->output->set_output($data);
@@ -85,7 +85,7 @@ For example, if you build a page in one of your controller functions, don't set
$this->output->get_output();
-Permits you to manually retrieve any output that has been sent for storage in the output class. Usage example:
+
Permits you to manually retrieve any output that has been sent for storage in the output class. Usage example:
$string = $this->output->get_output();
Note that data will only be retrievable from this function if it has been previously sent to the output class by one of the
@@ -94,7 +94,7 @@ CodeIgniter functions like $this->load->view().
$this->output->set_header();
-Permits you to manually set server headers, which the output class will send for you when outputting the final rendered display. Example:
+
Permits you to manually set server headers, which the output class will send for you when outputting the final rendered display. Example:
$this->output->set_header("HTTP/1.0 200 OK");
@@ -131,7 +131,7 @@ Previous Topic: Language Class
Top of Page ·
User Guide Home ·
Next Topic: Pagination Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html
index fafeb6cfc..edb112d35 100644
--- a/user_guide/libraries/pagination.html
+++ b/user_guide/libraries/pagination.html
@@ -99,7 +99,7 @@ minimum you need the three shown. Here is a description of what those items rep
per_page The number of items you intend to show per page. In the above example, you would be showing 20 items per page.
-The create_links() function returns an empty string when there is no pagination to show.
+
The create_links() function returns an empty string when there is no pagination to show.
Setting preferences in a config file
@@ -210,7 +210,7 @@ Previous Topic: Output Class
Top of Page ·
User Guide Home ·
Next Topic: Session Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html
index 24bb89ffc..e7b7add11 100644
--- a/user_guide/libraries/parser.html
+++ b/user_guide/libraries/parser.html
@@ -207,7 +207,7 @@ Previous Topic: Trackback Class
Top of Page ·
User Guide Home ·
Next Topic: Unit Testing Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html
index 5a3c4ae21..30e26263f 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -286,7 +286,7 @@ Previous Topic: Pagination Class
Top of Page ·
User Guide Home ·
Next Topic: Trackback Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html
index 28fc76d27..330a3da20 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -119,7 +119,7 @@ $this->table->add_row('John', 'Green', 'Medium');
echo $this->table->generate();
-Here is the same example, except instead of individual parameters, arrays are used:
+
Here is the same example, except instead of individual parameters, arrays are used:
$this->load->library('table');
@@ -289,7 +289,7 @@ Previous Topic: FTP Class &mi
Top of Page ·
User Guide Home ·
Next Topic: Image Manipulation Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index c54417c86..3dfb20375 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -78,7 +78,7 @@ Trackback Class
Sending Trackbacks
-A Trackback can be sent from any of your controller functions using code similar to this example:
+
A Trackback can be sent from any of your controller functions using code similar to this example:
$this->load->library('trackback');
@@ -243,7 +243,7 @@ Previous Topic: Session Class
Top of Page ·
User Guide Home ·
Next Topic: Template Parser Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html
index bdd64d04b..568bf6c6a 100644
--- a/user_guide/libraries/unit_testing.html
+++ b/user_guide/libraries/unit_testing.html
@@ -202,7 +202,7 @@ Previous Topic: Template Parser Class
Top of Page ·
User Guide Home ·
Next Topic: URI Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html
index ec7770570..7efca6dd1 100644
--- a/user_guide/libraries/uri.html
+++ b/user_guide/libraries/uri.html
@@ -105,7 +105,7 @@ else
$this->uri->rsegment(n)
This function is identical to the previous one, except that it lets you retrieve a specific segment from your
-re-routed URI in the event you are using CodeIgniter's URI Routing feature.
+re-routed URI in the event you are using CodeIgniter's URI Routing feature.
$this->uri->slash_segment(n)
@@ -129,7 +129,7 @@ $this->uri->slash_segment(3, 'both');
$this->uri->slash_rsegment(n)
This function is identical to the previous one, except that it lets you add slashes a specific segment from your
-re-routed URI in the event you are using CodeIgniter's URI Routing feature.
+re-routed URI in the event you are using CodeIgniter's URI Routing feature.
@@ -173,8 +173,7 @@ $array = $this->uri->uri_to_assoc(3, $default);
$this->uri->ruri_to_assoc(n)
This function is identical to the previous one, except that it creates an associative array using the
-re-routed URI in the event you are using CodeIgniter's URI Routing feature.
-
+re-routed URI in the event you are using CodeIgniter's URI Routing feature.
$this->uri->assoc_to_uri()
@@ -203,7 +202,7 @@ $str = $this->uri->assoc_to_uri($array);
$this->uri->ruri_string(n)
This function is identical to the previous one, except that it returns the
-re-routed URI in the event you are using CodeIgniter's URI Routing feature.
+re-routed URI in the event you are using CodeIgniter's URI Routing feature.
@@ -215,7 +214,7 @@ re-routed URI in the event you are using CodeIgniter's URI Routing feature.
+re-routed URI in the event you are using CodeIgniter's URI Routing feature.
@@ -250,7 +249,7 @@ Previous Topic: Unit Testing Class
Top of Page ·
User Guide Home ·
Next Topic: User Agent Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html
index e9f6b715b..5bb87a76b 100644
--- a/user_guide/libraries/user_agent.html
+++ b/user_guide/libraries/user_agent.html
@@ -81,7 +81,7 @@ various user agent arrays if needed.
Example
When the User Agent class is initialized it will attempt to determine whether the user agent browsing your site is
-a web browser, a mobile device, or a robot. It will also gather the platform information if it is available.
+a web browser, a mobile device, or a robot. It will also gather the platform information if it is available.
@@ -110,9 +110,6 @@ echo $this->agent->platform(); // Platform info (Windows, Linux, Mac, etc.)
-
-
-
Function Reference
@@ -170,7 +167,7 @@ very efficient. If you find that some bots that commonly visit your site are mis
if ($this->agent->accept_lang('en'))
{
echo 'You accept English!';
-}
+}
Note: This function is not typically very reliable
since some browsers do not provide language info, and even among those that do, it is not always accurate.
@@ -183,7 +180,7 @@ since some browsers do not provide language info, and even among those that do,
if ($this->agent->accept_charset('utf-8'))
{
echo 'You browser supports UTF-8!';
-}
+}
Note: This function is not typically very reliable
since some browsers do not provide character-set info, and even among those that do, it is not always accurate.
@@ -201,7 +198,7 @@ Previous Topic: URI Class
Top of Page ·
User Guide Home ·
Next Topic: Validation Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html
index 8ba45ba4b..cd239ea40 100644
--- a/user_guide/libraries/validation.html
+++ b/user_guide/libraries/validation.html
@@ -77,7 +77,7 @@ Form Validation
Check for required data.
Verify that the data is of the correct type, and meets the correct criteria. (For example, if a username is submitted
it must be validated to contain only permitted characters. It must be of a minimum length,
-and not exceed a maximum length. The username can't be someone else's existing username, or perhaps even a reserved word. Etc.)
+and not exceed a maximum length. The username can't be someone else's existing username, or perhaps even a reserved word. Etc.)
Sanitize the data for security.
Pre-format the data if needed (Does the data need to be trimmed? HTML encoded? Etc.)
Prep the data for insertion in the database.
@@ -109,34 +109,35 @@ It also removes all control structures from your form HTML, permitting it to be
folder:
-
-
-My Form
-
-
+<html>
+<head>
+<title>My Form</title>
+</head>
+<body>
-=$this->validation->error_string; ?>
+<?=$this->validation->error_string; ?>
-=form_open('form'); ?>
+<?=form_open('form'); ?>
-Username
-
+<h5>Username</h5>
+<input type="text" name="username" value="" size="50" />
-Password
-
+<h5>Password</h5>
+<input type="text" name="password" value="" size="50" />
-Password Confirm
-
+<h5>Password Confirm</h5>
+<input type="text" name="passconf" value="" size="50" />
-Email Address
-
+<h5>Email Address</h5>
+<input type="text" name="email" value="" size="50" />
-
+<div><input type="submit" value="Submit" /></div>
-
+</form>
-
-
+</body>
+</html>
+
The Success Page
@@ -146,18 +147,20 @@ folder:
folder:
-
-
-My Form
-
-
+
+<html>
+<head>
+<title>My Form</title>
+</head>
+<body>
-Your form was successfully submitted!
+<h3>Your form was successfully submitted!</h3>
-=anchor('form', 'Try it again!'); ?>
+<p><?=anchor('form', 'Try it again!'); ?></p>
-
-
+</body>
+</html>
+
The Controller
@@ -166,7 +169,7 @@ folder:
folder:
-<?php
class Form extends Controller {
@@ -314,7 +317,7 @@ $rules['email'] = "required|valid_email";
Prepping Data
In addition to the validation functions like the ones we used above, you can also prep your data in various ways.
-For example, you can set up rules like this:
+For example, you can set up rules like this:
$rules['username'] = "trim|required|min_length[5]|max_length[12]|xss_clean";
$rules['password'] = "trim|required|matches[passconf]|md5";
@@ -451,34 +454,36 @@ error message.
Now open your myform.php view file and update the value in each field so that it has an object corresponding to its name:
-
-
-My Form
-
-
+
+<html>
+<head>
+<title>My Form</title>
+</head>
+<body>
-=$this->validation->error_string; ?>
+<?=$this->validation->error_string; ?>
-=form_open('form'); ?>
+<?=form_open('form'); ?>
-Username
-
+<h5>Username</h5>
+<input type="text" name="username" value="<?=$this->validation->username;?>" size="50" />
-Password
-
+<h5>Password</h5>
+<input type="text" name="password" value="<?=$this->validation->password;?>" size="50" />
-Password Confirm
-
+<h5>Password Confirm</h5>
+<input type="text" name="passconf" value="<?=$this->validation->passconf;?>" size="50" />
-Email Address
-
+<h5>Email Address</h5>
+<input type="text" name="email" value="<?=$this->validation->email;?>" size="50" />
-
+<div><input type="submit" value="Submit" /></div>
-
+</form>
-
-
+</body>
+</html>
+
Now reload your page and submit the form so that it triggers an error. Your form fields should be populated
@@ -491,22 +496,22 @@ and the error messages will contain a more relevant field name.
If you prefer to show an error message next to each form field, rather than as a list, you can change your form so that it looks like this:
-
-Username
-=$this->validation->username_error; ?>
-
+<textarea class="textarea" style="width:100%" cols="50" rows="20">
+<h5>Username</h5>
+<?=$this->validation->username_error; ?>
+<input type="text" name="username" value="<?=$this->validation->username;?>" size="50" />
-Password
-=$this->validation->password_error; ?>
-
+<h5>Password</h5>
+<?=$this->validation->password_error; ?>
+<input type="text" name="password" value="<?=$this->validation->password;?>" size="50" />
-Password Confirm
-=$this->validation->passconf_error; ?>
-
+<h5>Password Confirm</h5>
+<?=$this->validation->passconf_error; ?>
+<input type="text" name="passconf" value="<?=$this->validation->passconf;?>" size="50" />
-Email Address
-=$this->validation->email_error; ?>
-
+<h5>Email Address</h5>
+<?=$this->validation->email_error; ?>
+<input type="text" name="email" value="<?=$this->validation->email;?>" size="50" /></textarea>
If there are no errors, nothing will be shown. If there is an error, the message will appear, wrapped in the delimiters you
have set (<p> tags by default).
@@ -589,16 +594,13 @@ For example, your "username" error will be available at:
$this->valida
Returns FALSE if the form element does not contain a valid email address.
-
+
valid_ip
No
Returns FALSE if the supplied IP is not valid.
-
-
-
Note: These rules can also be called as discreet functions. For example:
@@ -714,7 +716,7 @@ Previous Topic: User Agent Class
Top of Page ·
User Guide Home ·
Next Topic: XML-RPC Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index 5d9b9ee64..ba70e11a8 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -88,11 +88,11 @@ Once processed, the server will then send back a response message.
Like most other classes in CodeIgniter, the XML-RPC and XML-RPCS classes are initialized in your controller using the $this->load->library function:
-To load the XML-RPC class you will use:
+
To load the XML-RPC class you will use:
$this->load->library('xmlrpc');
Once loaded, the xml-rpc library object will be available using: $this->xmlrpc
-To load the XML-RPC Server class you will use:
+
To load the XML-RPC Server class you will use:
$this->load->library('xmlrpc');
$this->load->library('xmlrpcs');
@@ -193,7 +193,7 @@ $this->xmlrpcs->initialize($config);
$this->xmlrpcs->serve();
The above example contains an array specifying two method requests that the Server allows.
-The allowed methods are on the left side of the array. When either of those are received, they will be mapped to the class and method on the right.
+The allowed methods are on the left side of the array. When either of those are received, they will be mapped to the class and method on the right.
In other words, if an XML-RPC Client sends a request for the new_post method, your
server will load the My_blog class and call the new_entry function.
@@ -223,7 +223,7 @@ to exist with this prototype:
The $request variable is an object compiled by the Server, which contains the data sent by the XML-RPC Client.
Using this object you will have access to the request parameters enabling you to process the request. When
-you are done you will send a Response back to the Client.
+you are done you will send a Response back to the Client.
Below is a real-world example, using the Blogger API. One of the methods in the Blogger API is getUserInfo().
Using this method, an XML-RPC Client can send the Server a username and password, in return the Server sends
@@ -486,7 +486,7 @@ Previous Topic: Validation Class
Top of Page ·
User Guide Home ·
Next Topic: Zip Encoding Class
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html
index e1692234f..f92443b54 100644
--- a/user_guide/libraries/zip.html
+++ b/user_guide/libraries/zip.html
@@ -165,7 +165,7 @@ $this->zip->download('my_backup.zip');
If you would like the Zip archive to maintain the directory structure the file is in, pass TRUE (boolean) in the
-second parameter. Example:
+second parameter. Example:
@@ -275,7 +275,7 @@ Previous Topic: XML-RPC Class
Top of Page ·
User Guide Home ·
Next Topic: Array Helper
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/license.html b/user_guide/license.html
index f938c2cfc..d89cce5e1 100644
--- a/user_guide/license.html
+++ b/user_guide/license.html
@@ -104,8 +104,7 @@ Previous Topic: Server Requiremen
Top of Page ·
User Guide Home ·
Next Topic: Change Log
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/overview/appflow.html b/user_guide/overview/appflow.html
index d10d038a9..ac0f06738 100644
--- a/user_guide/overview/appflow.html
+++ b/user_guide/overview/appflow.html
@@ -92,8 +92,7 @@ Previous Topic: CodeIgniter Features
Top of Page ·
User Guide Home ·
Next Topic: Model-View-Controller
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html
index aadfe558e..2082b0253 100644
--- a/user_guide/overview/at_a_glance.html
+++ b/user_guide/overview/at_a_glance.html
@@ -169,8 +169,7 @@ Previous Topic: Upgrading fr
Top of Page ·
User Guide Home ·
Next Topic: CodeIgniter Features
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html
index 7033681fd..93c9e2f9d 100644
--- a/user_guide/overview/features.html
+++ b/user_guide/overview/features.html
@@ -117,8 +117,7 @@ Previous Topic: CodeIgniter At a GlanceTop of Page ·
User Guide Home ·
Next Topic: Application Flow Chart
-
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/overview/goals.html b/user_guide/overview/goals.html
index fba6f61a4..a596cab53 100644
--- a/user_guide/overview/goals.html
+++ b/user_guide/overview/goals.html
@@ -95,7 +95,7 @@ Previous Topic: Model-View-Controller
Top of Page ·
User Guide Home ·
Next Topic: Getting Started
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/overview/index.html b/user_guide/overview/index.html
index 133503fa9..87316a63a 100644
--- a/user_guide/overview/index.html
+++ b/user_guide/overview/index.html
@@ -81,7 +81,7 @@ Introduction
diff --git a/user_guide/overview/mvc.html b/user_guide/overview/mvc.html
index baac03da4..fe8d86393 100644
--- a/user_guide/overview/mvc.html
+++ b/user_guide/overview/mvc.html
@@ -97,7 +97,7 @@ Previous Topic: Application Flow Chart
Top of Page ·
User Guide Home ·
Next Topic: Architectural Goals
-
+
CodeIgniter · Copyright © 2007 · Ellislab, Inc.
diff --git a/user_guide/toc.html b/user_guide/toc.html
index 12c16183d..88ccaafaf 100644
--- a/user_guide/toc.html
+++ b/user_guide/toc.html
@@ -193,7 +193,7 @@ Table of Contents
--
cgit v1.2.3-24-g4f1b