From 4dfca5e7fdb72062c73f0765efb0dd596d6081e5 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Wed, 6 Apr 2011 15:02:06 -0400 Subject: Hat tip to the reactor team in the credits --- user_guide/general/credits.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'user_guide/general') diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index 7977956a8..e64a74558 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -62,7 +62,8 @@ Credits world, with many of the class libraries, helpers, and sub-systems borrowed from the code-base of ExpressionEngine.

-

It is currently developed and maintained by the ExpressionEngine Development Team.

+

It is currently developed and maintained by the ExpressionEngine Development Team.
+Bleeding edge development is spearheaded by the handpicked contributors of the Reactor Team.

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.

-- cgit v1.2.3-24-g4f1b From 8d63cc67bc8671c31e530f1d795bd82c8d3e60b3 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 7 Apr 2011 11:52:41 +0100 Subject: Added CLI documentation. --- user_guide/general/cli.html | 150 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 user_guide/general/cli.html (limited to 'user_guide/general') diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html new file mode 100644 index 000000000..affafadf7 --- /dev/null +++ b/user_guide/general/cli.html @@ -0,0 +1,150 @@ + + + + + +Running via the CLI : CodeIgniter User Guide + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

CodeIgniter User Guide Version 2.0.1

+
+ + + + + + + + + +
+ + +
+ + + +
+ +

Running via the CLI

+ +

+ As well as calling an applications Controllers via the URL in a browser they can also be loaded via the command-line interface (CLI). +

+ + + + + + +

What is the CLI?

+ +

The command-line interface is a text-based method of interacting with computers that looks like what most people remember as DOS.

+ + + +

Why run via the command-line?

+ +

+ There are many reasons for running CodeIgniter from the command-line, but they are not always obvious.

+ +
    +
  • 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 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!
  • +
+ + +

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 tools.php, and put the following code in it:

+ + + +

Then save the file to your application/controllers/ folder.

+ +

Now normally you would visit the your site using a URL similar to this:

+ +example.com/index.php/tools/message/to + +

Instead, we are going to open Terminal in Mac/Lunix or go to Run > "cmd" in Windows and navigate to our CodeIgniter project.

+ +
+ $ cd /path/to/project;
+ $ php index.php tools message +
+ +

If you did it right, you should see Hello World!.

+ +
+ $ php index.php tools message "John Smith" +
+ +

Here we are passing it a argument in the same way that URL parameters work. "John Smith" is passed as a argument and output is: Hello John Smith!.

+ +

That's it!

+ +

That, in a nutshell, is all there is to know about controllers on the command line. Remember that this is just a normal controller, so routing and _remap works fine.

+ + + +
+ + + + + + + \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 1f622294b92c095fd91e8ca44912d405c1605ded Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Thu, 7 Apr 2011 12:06:51 -0400 Subject: Wow, I screwed that up, Reactor is going to 2.0.2 not 2.0.1 --- 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 f4ec6ccc2..abd5845ff 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/ancillary_classes.html b/user_guide/general/ancillary_classes.html index d343cdc0d..a7365e706 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html index 81ae311dd..fae0b5fd9 100644 --- a/user_guide/general/autoloader.html +++ b/user_guide/general/autoloader.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html index 61b586f96..c77f9a15d 100644 --- a/user_guide/general/caching.html +++ b/user_guide/general/caching.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html index affafadf7..962954b15 100644 --- a/user_guide/general/cli.html +++ b/user_guide/general/cli.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/common_functions.html b/user_guide/general/common_functions.html index 225269e1d..bfac32685 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html index 2da98b6c7..c90916472 100644 --- a/user_guide/general/controllers.html +++ b/user_guide/general/controllers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html index 4edad8332..51c2c7440 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/creating_drivers.html b/user_guide/general/creating_drivers.html index 3d6640da6..a7594056b 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/creating_libraries.html b/user_guide/general/creating_libraries.html index 6d65f6599..8198c18fe 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html index e64a74558..9e0fbac04 100644 --- a/user_guide/general/credits.html +++ b/user_guide/general/credits.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/drivers.html b/user_guide/general/drivers.html index 2b9f78cc4..8dbeb93a8 100644 --- a/user_guide/general/drivers.html +++ b/user_guide/general/drivers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/environments.html b/user_guide/general/environments.html index 76fe214bc..175a1531e 100644 --- a/user_guide/general/environments.html +++ b/user_guide/general/environments.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html index ece80b2fd..58eff6597 100644 --- a/user_guide/general/errors.html +++ b/user_guide/general/errors.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html index 95693a555..339a0df02 100644 --- a/user_guide/general/helpers.html +++ b/user_guide/general/helpers.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html index a72e84a43..11de40902 100644 --- a/user_guide/general/hooks.html +++ b/user_guide/general/hooks.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html index 58ddc6d9b..ce367cdeb 100644 --- a/user_guide/general/libraries.html +++ b/user_guide/general/libraries.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html index b08d4aa6b..ea886d9cb 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 2cd8e4d23..117c810b7 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -27,7 +27,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index 868cce7b7..f3ea0c6fd 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/quick_reference.html b/user_guide/general/quick_reference.html index cb264803b..9273708f3 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html index d8043aea2..ab0e28857 100644 --- a/user_guide/general/requirements.html +++ b/user_guide/general/requirements.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html index 2dbbb5bb6..d1ee2955b 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.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index 4413ef997..6ee6ad384 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/security.html b/user_guide/general/security.html index c47b5b25e..ab92a94ba 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index 821860829..b2b681d8c 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -34,7 +34,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 29ed8ea94..421f51301 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

diff --git a/user_guide/general/views.html b/user_guide/general/views.html index 2a06a9c66..ad93f4bc7 100644 --- a/user_guide/general/views.html +++ b/user_guide/general/views.html @@ -28,7 +28,7 @@
- +

CodeIgniter User Guide Version 2.0.1

CodeIgniter User Guide Version 2.0.2

-- cgit v1.2.3-24-g4f1b From c31b3729da50eaade365451f49dac7d462684702 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Sun, 17 Apr 2011 23:58:40 -0400 Subject: Added ENVIRONMENT to reserved constants. Fixes #196 --- user_guide/general/reserved_names.html | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide/general') diff --git a/user_guide/general/reserved_names.html b/user_guide/general/reserved_names.html index d1ee2955b..00bebff61 100644 --- a/user_guide/general/reserved_names.html +++ b/user_guide/general/reserved_names.html @@ -90,6 +90,7 @@ is a list of reserved names. Do not name your controller any of these:

Constants

    +
  • ENVIRONMENT
  • EXT
  • FCPATH
  • SELF
  • -- cgit v1.2.3-24-g4f1b From e6e6e64ab078205153513af24dd4163157efb148 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Mon, 18 Apr 2011 15:54:13 -0500 Subject: changeset: 2204:37301a84c8be tag: tip user: Greg Aker date: Mon Apr 18 15:51:28 2011 -0500 summary: Adding toggle show/hide on database queries in the output profiler. Added a profiler config item to set a threshold of when to hide the queries by default. Additionally, fixed a bug I created earlier today by marking the $CI class var in CI_Profiler as private. --- user_guide/general/profiling.html | 103 ++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 49 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html index f3ea0c6fd..78ece7dcd 100644 --- a/user_guide/general/profiling.html +++ b/user_guide/general/profiling.html @@ -105,55 +105,60 @@ This information can be useful during development in order to help with debuggin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyDescriptionDefault
    benchmarksElapsed time of Benchmark points and total execution timeTRUE
    configCodeIgniter Config variablesTRUE
    controller_infoThe Controller class and method requestedTRUE
    getAny GET data passed in the requestTRUE
    http_headersThe HTTP headers for the current requestTRUE
    memory_usageAmount of memory consumed by the current request, in bytesTRUE
    postAny POST data passed in the requestTRUE
    queriesListing of all database queries executed, including execution timeTRUE
    uri_stringThe URI of the current requestTRUE
    KeyDescriptionDefault
    benchmarksElapsed time of Benchmark points and total execution timeTRUE
    configCodeIgniter Config variablesTRUE
    controller_infoThe Controller class and method requestedTRUE
    getAny GET data passed in the requestTRUE
    http_headersThe HTTP headers for the current requestTRUE
    memory_usageAmount of memory consumed by the current request, in bytesTRUE
    postAny POST data passed in the requestTRUE
    queriesListing of all database queries executed, including execution timeTRUE
    uri_stringThe URI of the current requestTRUE
    query_toggle_countThe number of queries after which the query block will default to hidden.25
    -- cgit v1.2.3-24-g4f1b From 636b05898c96820d65a0fd133e11c1f5f48fbb49 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Sun, 24 Apr 2011 20:57:04 -0400 Subject: Fixed #243 - Changed php version in the style guide to match requirements. --- user_guide/general/styleguide.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/general') diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html index b2b681d8c..1f7a8a048 100644 --- a/user_guide/general/styleguide.html +++ b/user_guide/general/styleguide.html @@ -381,7 +381,7 @@ function build_string($str = "")

    Compatibility

    -

    Unless specifically mentioned in your add-on's documentation, all code must be compatible with PHP version 4.3+. Additionally, do not use PHP functions that require non-default libraries to be installed unless your code contains an alternative method when the function is not available, or you implicitly document that your add-on requires said PHP libraries.

    +

    Unless specifically mentioned in your add-on's documentation, all code must be compatible with PHP version 5.1+. Additionally, do not use PHP functions that require non-default libraries to be installed unless your code contains an alternative method when the function is not available, or you implicitly document that your add-on requires said PHP libraries.

    -- cgit v1.2.3-24-g4f1b From 48d6d5856ea95dd363f2a420f08200f488fb5151 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 14:03:54 +0200 Subject: Fixed #74. --- user_guide/general/routing.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'user_guide/general') diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index 6ee6ad384..d1d8d1a8e 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -145,6 +145,11 @@ Higher routes will always take precedence over lower ones.

    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.

    +$route['404_override'] = ''; + +

    This route indicates which controller class should be loaded if the requested controller is not found. It will override the default 404 +error page. It won't affect to the show_404() function, which will continue loading the default error_404.php file at application/errors/error_404.php.

    +

    Important:  The reserved routes must come before any wildcard or regular expression routes.

-- cgit v1.2.3-24-g4f1b From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- 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 abd5845ff..574ab35d7 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 fae0b5fd9..405dda30f 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 c77f9a15d..abfe6ded9 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 bfac32685..3c7a5df9e 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 c90916472..01ef3d1ff 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 25d495b4a2598f771a858108a2cd2e96f0130412 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Tue, 26 Apr 2011 23:02:44 -0400 Subject: Removed the GET, POST, and COOKIE Data from security since we now allow $_GET data. Fixes #48 --- user_guide/general/security.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'user_guide/general') diff --git a/user_guide/general/security.html b/user_guide/general/security.html index bcbb36c6f..31dd7978c 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -76,15 +76,9 @@ minimize the possibility that malicious data can be passed to your application.
  • Dash: -
  • -

    GET, POST, and COOKIE Data

    - -

    GET data is simply disallowed by CodeIgniter 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 unset by the Input class during system initialization.

    -

    Register_globals

    -

    During system initialization all global variables are unset, except those found in the $_POST and $_COOKIE arrays. The unsetting +

    During system initialization all global variables are unset, except those found in the $_GET, $_POST, and $_COOKIE arrays. The unsetting routine is effectively the same as register_globals = off.

    -- cgit v1.2.3-24-g4f1b