Codeigniter: won't load controller page -


i have web page made codeigniter, , works fine, when try add controller gives me a:"404 page not found" - "the page requested not found." why? controller i'm adding 1 tutorial (i'm practising):

<?php class blog extends ci_controller {      public function index()     {         echo 'hello world!';     } } ?> 

i'm using ubuntu, if makes difference.

better check out

// file name : blog.php  class blog extends ci_controller(){        function blog(){            parent::__construct();        }        function index(){            echo 'helloworld';        }     } 
  1. your controller filename should equal or same created class controller name.
  2. try put constructor before index this.

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -