CodeIgniter Forums
loading URI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: loading URI (/showthread.php?tid=23777)



loading URI - El Forum - 10-21-2009

[eluser]wilfred[/eluser]
When trying to load the contollers e.g for blog.php using the URI below
http://localhost/CodeIgniter_1.7.1/system/application/Controllers/blog.php
I get
Fatal error: Class 'Controller' not found in
C:wampwwwCodeIgniter_1.7.1systemapplicationcontrollersblog.php on
line 2
please help me out.


loading URI - El Forum - 10-21-2009

[eluser]imn.codeartist[/eluser]
it gave you error because its not a right way to run your controller.

steps to run:

1) open your system/application/config.php file

find
Code:
$config['base_url'] "http://www.example.com/";

replace with your app folder name for example

Code:
$config['base_url']= "http://localhost/mysite/";

2) run your blog code as below

http://localhost/mysite/index.php/blog

then it will works