summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/cli.rst
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2012-12-12 14:02:11 +0100
committerEric Roberts <eric@cryode.com>2012-12-12 14:02:11 +0100
commitb9e35f21e1c70b6aa67c47e9244ed83195abc00a (patch)
tree64f82db362deeac48cc20d1d1afd80651f36f5a5 /user_guide_src/source/general/cli.rst
parent0b05705c52c3bca7f9b3aee657c888e8ad1ff422 (diff)
parent545a7c86701875e1412bcde316e9bcc76d9a23a0 (diff)
Merge branch 'refs/heads/develop' into feature/form_error_msgs
Conflicts: system/language/english/form_validation_lang.php user_guide_src/source/libraries/form_validation.rst Signed-off-by: Eric Roberts <eric@cryode.com>
Diffstat (limited to 'user_guide_src/source/general/cli.rst')
-rw-r--r--user_guide_src/source/general/cli.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/user_guide_src/source/general/cli.rst b/user_guide_src/source/general/cli.rst
index 7dc1ca319..998d2a907 100644
--- a/user_guide_src/source/general/cli.rst
+++ b/user_guide_src/source/general/cli.rst
@@ -21,7 +21,7 @@ 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
+- 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 ``$this->input->is_cli_request()``
- Make interactive "tasks" that can do things like set permissions,
@@ -44,15 +44,14 @@ in it::
echo "Hello {$to}!".PHP_EOL;
}
}
- ?>
-Then save the file to your application/controllers/ folder.
+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"
+Instead, we are going to open Terminal in Mac/Linux or go to Run > "cmd"
in Windows and navigate to our CodeIgniter project.
.. code-block:: bash
@@ -60,19 +59,20 @@ 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!.
+If you did it right, you should see *Hello World!* printed.
.. code-block:: bash
$ 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!.
+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.
+and ``_remap()`` works fine. \ No newline at end of file