From 37f4b9caa02783e06dd7c5318200113409a0deb1 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 1 Jul 2011 17:56:50 -0500 Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit. It broke the Typography class's string replacements, for instance --- user_guide/general/alternative_php.html | 16 ++++---- user_guide/general/autoloader.html | 2 +- user_guide/general/caching.html | 8 ++-- user_guide/general/common_functions.html | 6 +-- user_guide/general/controllers.html | 32 +++++++-------- user_guide/general/core_classes.html | 4 +- user_guide/general/creating_libraries.html | 26 ++++++------ user_guide/general/credits.html | 2 +- user_guide/general/drivers.html | 6 +-- user_guide/general/environments.html | 40 +++++++++---------- user_guide/general/errors.html | 18 ++++----- user_guide/general/helpers.html | 26 ++++++------ user_guide/general/hooks.html | 16 ++++---- user_guide/general/libraries.html | 2 +- user_guide/general/managing_apps.html | 8 ++-- user_guide/general/models.html | 18 ++++----- user_guide/general/profiling.html | 2 +- user_guide/general/reserved_names.html | 4 +- user_guide/general/routing.html | 12 +++--- user_guide/general/security.html | 26 ++++++------ user_guide/general/styleguide.html | 64 +++++++++++++++--------------- user_guide/general/urls.html | 8 ++-- user_guide/general/views.html | 28 ++++++------- 23 files changed, 187 insertions(+), 187 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index 574ab35d7..abd5845ff 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -58,19 +58,19 @@ Alternate PHP Syntax

Alternate PHP Syntax for View Files

If you do not utilize CodeIgniter's template engine, 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 short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, +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 short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, and eliminate "echo" statements.

Automatic Short Tag Support

Note: 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. CodeIgniter will optionally rewrite short tags on-the-fly, -allowing you to use that syntax even if your server doesn't support it. This feature can be enabled in your +allowing you to use that syntax even if your server doesn't support it. This feature can be enabled in your config/config.php file.

Please note that if you do use this feature, if PHP errors are encountered -in your view files, the error message and line number will not be accurately shown. Instead, all errors +in your view files, the error message and line number will not be accurately shown. Instead, all errors will be shown as eval() errors.

@@ -89,7 +89,7 @@ will be shown as eval() errors.

Alternative Control Structures

Controls structures, like if, for, foreach, and while can be -written in a simplified format as well. Here is an example using foreach:

+written in a simplified format as well. Here is an example using foreach:

<ul>
@@ -102,14 +102,14 @@ written in a simplified format as well. Here is an example using foreach:


</ul>
-

Notice that there are no braces. Instead, the end brace is replaced with endforeach. +

Notice that there are no braces. Instead, the end brace is replaced with endforeach. Each of the control structures listed above has a similar closing syntax: endif, endfor, endforeach, and endwhile

-

Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is +

Also notice that instead of using a semicolon after each structure (except the last one), there is a colon. This is important!

-

Here is another example, using if/elseif/else. Notice the colons:

+

Here is another example, using if/elseif/else. Notice the colons:

<?php if ($username == 'sally'): ?>
diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index 405dda30f..fae0b5fd9 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -75,7 +75,7 @@ consider auto-loading them for convenience.

loaded to the autoload array. You'll find instructions in that file corresponding to each type of item.

-

Note: Do not include the file extension (.php) when adding items to the autoload array.

+

Note: Do not include the file extension (.php) when adding items to the autoload array.

diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index abfe6ded9..c77f9a15d 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -68,8 +68,8 @@ By caching your pages, since they are saved in their fully rendered state, you c

How Does Caching Work?

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 application/cache 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.

+When a page is loaded for the first time, the cache file will be written to your application/cache 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.

Note: The Benchmark tag is not cached so you can still view your page load speed when caching is enabled.

@@ -90,8 +90,8 @@ most logical to you. Once the tag is in place, your pages will begin being cache

Deleting Caches

-

If you no longer wish to cache a file you can remove the caching tag and it will no 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 +

If you no longer wish to cache a file you can remove the caching tag and it will no 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.

diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 3c7a5df9e..bfac32685 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -68,7 +68,7 @@ Auto-loading Resources     $str = quoted_printable_encode($str);
}
-

Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of PHP is lower than the supplied version number.

+

Returns boolean TRUE if the installed version of PHP is equal to or greater than the supplied version number. Returns FALSE if the installed version of PHP is lower than the supplied version number.

is_really_writable('path/to/file')

@@ -92,10 +92,10 @@ else

set_status_header(code, 'text');

-

Permits you to manually set a server status header. Example:

+

Permits you to manually set a server status header. Example:

set_status_header(401);
-// Sets the header as: Unauthorized
+// Sets the header as: Unauthorized

See here for a full list of headers.

diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 01ef3d1ff..c90916472 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -91,7 +91,7 @@ Controllers

Let's try it:  Hello World!

-

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

+

Let's create a simple controller so you can see it in action. Using your text editor, create a file called blog.php, and put the following code in it:

-

If you visit your site using the URL you did earlier you should see your new view. The URL was similar to this:

+

If you visit your site using the URL you did earlier you should see your new view. The URL was similar to this:

example.com/index.php/blog/

Loading multiple views

-

CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more than one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:

+

CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more than one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:

<?php

class Page extends CI_Controller {

   function index()
   {
-      $data['page_title'] = 'Your title';
+      $data['page_title'] = 'Your title';
      $this->load->view('header');
      $this->load->view('menu');
      $this->load->view('content', $data);
@@ -132,8 +132,8 @@ class Page extends CI_Controller {

?>

In the example above, we are using "dynamically added data", which you will see below.

Storing Views within Sub-folders

-

Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need -to include the folder name loading the view. Example:

+

Your view files can also be stored within sub-folders if you prefer that type of organization. When doing so you will need +to include the folder name loading the view. Example:

$this->load->view('folder_name/file_name'); @@ -159,7 +159,7 @@ $this->load->view('blogview', $data);

Note: If you use an object, the class variables will be turned into array elements.

-

Let's try it with your controller file. Open it add this code:

+

Let's try it with your controller file. Open it add this code:

-

Note: You'll notice that in the example above we are using PHP's alternative syntax. If you +

Note: You'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 here.

Returning views as data

There is a third optional parameter lets you change the behavior of the function so that it returns data as a string -rather than sending it to your browser. This can be useful if you want to process the data in some way. If you -set the parameter to true (boolean) it will return data. The default behavior is false, which sends it -to your browser. Remember to assign it to a variable if you want the data returned:

+rather than sending it to your browser. This can be useful if you want to process the data in some way. If you +set the parameter to true (boolean) it will return data. The default behavior is false, which sends it +to your browser. Remember to assign it to a variable if you want the data returned:

$string = $this->load->view('myfile', '', true); -- cgit v1.2.3-24-g4f1b From 9c63d0bb34be4007178d5a7e46348d5e23fee3ff Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 27 Oct 2011 01:55:44 +0100 Subject: Bumped CodeIgniter version to 2.1.0. --- user_guide/general/alternative_php.html | 2 +- user_guide/general/ancillary_classes.html | 2 +- user_guide/general/autoloader.html | 2 +- user_guide/general/caching.html | 2 +- user_guide/general/cli.html | 2 +- user_guide/general/common_functions.html | 2 +- user_guide/general/controllers.html | 2 +- user_guide/general/core_classes.html | 2 +- user_guide/general/creating_drivers.html | 2 +- user_guide/general/creating_libraries.html | 2 +- user_guide/general/credits.html | 2 +- user_guide/general/drivers.html | 2 +- user_guide/general/environments.html | 2 +- user_guide/general/errors.html | 2 +- user_guide/general/helpers.html | 2 +- user_guide/general/hooks.html | 2 +- user_guide/general/libraries.html | 2 +- user_guide/general/managing_apps.html | 2 +- user_guide/general/models.html | 2 +- user_guide/general/profiling.html | 2 +- user_guide/general/quick_reference.html | 2 +- user_guide/general/requirements.html | 2 +- user_guide/general/reserved_names.html | 2 +- user_guide/general/routing.html | 2 +- user_guide/general/security.html | 2 +- user_guide/general/styleguide.html | 2 +- user_guide/general/urls.html | 2 +- user_guide/general/views.html | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/alternative_php.html b/user_guide/general/alternative_php.html index a4ce418e9..6e601af44 100644 --- a/user_guide/general/alternative_php.html +++ b/user_guide/general/alternative_php.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html index fb78edaeb..0e3d54deb 100644 --- a/user_guide/general/ancillary_classes.html +++ b/user_guide/general/ancillary_classes.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index b65674fda..699751202 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index b40e770a9..a0d7596ed 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index befc9994a..70ab13802 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 65457759d..2751133bb 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 2d525141c..91dd95a00 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html index b8917864f..be711903c 100644 --- a/user_guide/general/core_classes.html +++ b/user_guide/general/core_classes.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/creating_drivers.html b/user_guide/general/creating_drivers.html index 367755452..77cccd03c 100644 --- a/user_guide/general/creating_drivers.html +++ b/user_guide/general/creating_drivers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index aeec871b2..f905bb7c3 100644 --- a/user_guide/general/creating_libraries.html +++ b/user_guide/general/creating_libraries.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index 2785e7f25..00c577871 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/drivers.html b/user_guide/general/drivers.html index d0e4a1f1b..f463adb10 100644 --- a/user_guide/general/drivers.html +++ b/user_guide/general/drivers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html index 38ce862b4..0245b085d 100644 --- a/user_guide/general/environments.html +++ b/user_guide/general/environments.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html index 83725dcc5..d6bed9ea1 100644 --- a/user_guide/general/errors.html +++ b/user_guide/general/errors.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html index 3747eb7b9..619e9ff78 100644 --- a/user_guide/general/helpers.html +++ b/user_guide/general/helpers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index c0d616c50..07d302a7d 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html index 40533e124..73b642bef 100644 --- a/user_guide/general/libraries.html +++ b/user_guide/general/libraries.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html index e716d1072..388519796 100644 --- a/user_guide/general/managing_apps.html +++ b/user_guide/general/managing_apps.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 1696f424a..7bda4d9a9 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -27,7 +27,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index 9895b0284..451b6f9e6 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html index 242e9afb8..6c07b335c 100644 --- a/user_guide/general/quick_reference.html +++ b/user_guide/general/quick_reference.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index 405798f04..1393b40e0 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html index 91d93a03b..450c0f667 100644 --- a/user_guide/general/reserved_names.html +++ b/user_guide/general/reserved_names.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index c6429628e..d5c90a1b8 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/security.html b/user_guide/general/security.html index 5685bfa89..9e78d4c68 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index 25fab6547..c94313365 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -34,7 +34,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 580b5fc54..edf03309b 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

diff --git a/user_guide/general/views.html b/user_guide/general/views.html index a2273f862..5dc1d3250 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.3

CodeIgniter User Guide Version 2.1.0

-- cgit v1.2.3-24-g4f1b From fd82e02ee3636ed7feeedfeefeef794cf77c3a70 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 4 Sep 2011 13:55:28 +0100 Subject: Removed reference is IS_CLI in the documentation, which should have been $this->input->is_cli_request() --- user_guide/general/cli.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/general') diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index 70ab13802..5dda24b56 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -83,7 +83,7 @@ Running via the CLI
  • Run your cron-jobs without needing to use wget or curl
  • -
  • Make your cron-jobs inaccessible from being loaded in the URL by checking for IS_CLI
  • +
  • Make your cron-jobs inaccessible from being loaded in the URL by checking for $this->input->is_cli_request()
  • Make interactive "tasks" that can do things like set permissions, prune cache folders, run backups, etc.
  • Integrate with other applications in other languages. For example, a random C++ script could call one command and run code in your models!
-- cgit v1.2.3-24-g4f1b From 55027807e4826dfe722598172ab7ffbd9dc0b48c Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 25 Aug 2011 10:51:44 +0900 Subject: add html_escape() function to escape HTML. --- user_guide/general/common_functions.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide/general') diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 2751133bb..f290521a9 100644 --- a/user_guide/general/common_functions.html +++ b/user_guide/general/common_functions.html @@ -104,6 +104,8 @@ else

This function prevents inserting null characters between ascii characters, like Java\0script.

+

html_escape($mixed)

+

This function provides short cut for htmlspecialchars() function. It accepts string and array. To prevent Cross Site Scripting (XSS), it is very useful.

-- cgit v1.2.3-24-g4f1b