@@ -18,7 +18,7 @@ Consider this URI::
1818 example.com/index.php/blog/
1919
2020In the above example, CodeIgniter would attempt to find a controller
21- named blog .php and load it.
21+ named Blog .php and load it.
2222
2323**When a controller's name matches the first segment of a URI, it will
2424be loaded. **
@@ -27,7 +27,7 @@ Let's try it: Hello World!
2727==========================
2828
2929Let's create a simple controller so you can see it in action. Using your
30- text editor, create a file called blog .php, and put the following code
30+ text editor, create a file called Blog .php, and put the following code
3131in it::
3232
3333 <?php
@@ -41,6 +41,8 @@ in it::
4141
4242Then save the file to your *application/controllers/ * directory.
4343
44+ .. important :: The file must be called 'Blog.php', with a capital 'B'.
45+
4446Now visit the your site using a URL similar to this::
4547
4648 example.com/index.php/blog/
@@ -136,7 +138,7 @@ present, as will be the case when only your site root URL is requested.
136138To specify a default controller, open your **application/config/routes.php **
137139file and set this variable::
138140
139- $route['default_controller'] = 'blog ';
141+ $route['default_controller'] = 'Blog ';
140142
141143Where Blog is the name of the controller class you want used. If you now
142144load your main index.php file without specifying any URI segments you'll
@@ -272,7 +274,7 @@ and place your controller classes within them.
272274 specify the folder. For example, let's say you have a controller located
273275 here::
274276
275- application/controllers/products/shoes .php
277+ application/controllers/products/Shoes .php
276278
277279 To call the above controller your URI will look something like this::
278280
0 commit comments