summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/general')
-rw-r--r--user_guide_src/source/general/index.rst63
-rw-r--r--user_guide_src/source/general/styleguide.rst23
-rw-r--r--user_guide_src/source/general/urls.rst20
3 files changed, 60 insertions, 46 deletions
diff --git a/user_guide_src/source/general/index.rst b/user_guide_src/source/general/index.rst
index ae0d0961c..2162b8140 100644
--- a/user_guide_src/source/general/index.rst
+++ b/user_guide_src/source/general/index.rst
@@ -1,39 +1,32 @@
-##################
-General
-##################
-
-
-- :doc:`CodeIgniter URLs <urls>`
-- :doc:`Controllers <controllers>`
-- :doc:`Reserved Names <reserved_names>`
-- :doc:`Views <views>`
-- :doc:`Models <models>`
-- :doc:`Helpers <helpers>`
-- :doc:`Using CodeIgniter Libraries <libraries>`
-- :doc:`Creating Your Own Libraries <creating_libraries>`
-- :doc:`Using CodeIgniter Drivers <drivers>`
-- :doc:`Creating Your Own Drivers <creating_drivers>`
-- :doc:`Creating Core Classes <core_classes>`
-- :doc:`Creating Ancillary Classes <ancillary_classes>`
-- :doc:`Hooks - Extending the Core <hooks>`
-- :doc:`Auto-loading Resources <autoloader>`
-- :doc:`Common Function <common_functions>`
-- :doc:`URI Routing <routing>`
-- :doc:`Error Handling <errors>`
-- :doc:`Caching <caching>`
-- :doc:`Profiling Your Application <profiling>`
-- :doc:`Running via the CLI <cli>`
-- :doc:`Managing Applications <managing_apps>`
-- :doc:`Handling Multiple Environments <environments>`
-- :doc:`Alternative PHP Syntax <alternative_php>`
-- :doc:`Security <security>`
-- :doc:`PHP Style Guide <styleguide>`
-- :doc:`Server Requirements <requirements>`
-- :doc:`Credits <credits>`
+##############
+General Topics
+##############
.. toctree::
- :glob:
:titlesonly:
- :hidden:
- * \ No newline at end of file
+ urls
+ controllers
+ reserved_names
+ views
+ models
+ Helpers <helpers>
+ libraries
+ creating_libraries
+ drivers
+ creating_drivers
+ core_classes
+ ancillary_classes
+ hooks
+ autoloader
+ common_functions
+ routing
+ errors
+ Caching <caching>
+ profiling
+ cli
+ managing_apps
+ environments
+ alternative_php
+ security
+ PHP Style Guide <styleguide>
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index 0373fc791..d8bdd0531 100644
--- a/user_guide_src/source/general/styleguide.rst
+++ b/user_guide_src/source/general/styleguide.rst
@@ -1,6 +1,7 @@
-########################
-General Style and Syntax
-########################
+###############
+PHP Style Guide
+###############
+
The following page describes the use of coding rules adhered to when
developing CodeIgniter.
@@ -440,6 +441,13 @@ same level as the control statement that "owns" them.
// ...
}
}
+
+ try {
+ // ...
+ }
+ catch() {
+ // ...
+ }
**CORRECT**::
@@ -469,6 +477,15 @@ same level as the control statement that "owns" them.
// ...
}
}
+
+ try
+ {
+ // ...
+ }
+ catch()
+ {
+ // ...
+ }
Bracket and Parenthetic Spacing
===============================
diff --git a/user_guide_src/source/general/urls.rst b/user_guide_src/source/general/urls.rst
index 211537675..6b390b559 100644
--- a/user_guide_src/source/general/urls.rst
+++ b/user_guide_src/source/general/urls.rst
@@ -39,18 +39,22 @@ By default, the **index.php** file will be included in your URLs::
example.com/index.php/news/article/my_article
-You can easily remove this file by using a .htaccess file with some
-simple rules. Here is an example of such a file, using the "negative"
-method in which everything is redirected except the specified items:
+If your Apache server has mod_rewrite enabled, you can easily remove this
+file by using a .htaccess file with some simple rules. Here is an example
+of such a file, using the "negative" method in which everything is redirected
+except the specified items:
::
- RewriteEngine on
- RewriteCond $1 !^(index\.php|images|robots\.txt)
- RewriteRule ^(.*)$ /index.php/$1 [L]
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule ^(.*)$ index.php/$1 [L]
-In the above example, any HTTP request other than those for index.php,
-images, and robots.txt is treated as a request for your index.php file.
+In the above example, any HTTP request other than those for existing
+directories and existing files is treated as a request for your index.php file.
+
+.. note:: Note: These specific rules might not work for all server configurations.
Adding a URL Suffix
===================