summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/general/controllers.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-22 13:29:10 +0200
commit20292311636837e120d205e470e41826820feb46 (patch)
treebb9fa90e5b249369f6ad1e0e635e8ef3e2fdd13d /user_guide_src/source/general/controllers.rst
parent2d536f848dae5b1781bdfbdaf914fed1010e72bf (diff)
Change class filenames to Ucfirst
Diffstat (limited to 'user_guide_src/source/general/controllers.rst')
-rw-r--r--user_guide_src/source/general/controllers.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/user_guide_src/source/general/controllers.rst b/user_guide_src/source/general/controllers.rst
index 04f23276d..d8ef824fb 100644
--- a/user_guide_src/source/general/controllers.rst
+++ b/user_guide_src/source/general/controllers.rst
@@ -18,7 +18,7 @@ Consider this URI::
example.com/index.php/blog/
In the above example, CodeIgniter would attempt to find a controller
-named blog.php and load it.
+named Blog.php and load it.
**When a controller's name matches the first segment of a URI, it will
be loaded.**
@@ -27,7 +27,7 @@ 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
+text editor, create a file called Blog.php, and put the following code
in it::
<?php
@@ -41,6 +41,8 @@ in it::
Then save the file to your *application/controllers/* directory.
+.. important:: The file must be called 'Blog.php', with a capital 'B'.
+
Now visit the your site using a URL similar to this::
example.com/index.php/blog/
@@ -136,7 +138,7 @@ present, as will be the case when only your site root URL is requested.
To specify a default controller, open your **application/config/routes.php**
file and set this variable::
- $route['default_controller'] = 'blog';
+ $route['default_controller'] = 'Blog';
Where Blog is the name of the controller class you want used. If you now
load your main index.php file without specifying any URI segments you'll
@@ -272,7 +274,7 @@ and place your controller classes within them.
specify the folder. For example, let's say you have a controller located
here::
- application/controllers/products/shoes.php
+ application/controllers/products/Shoes.php
To call the above controller your URI will look something like this::