CodeIgniter Forums
Created a subfolder under controllers... - 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: Created a subfolder under controllers... (/showthread.php?tid=14170)



Created a subfolder under controllers... - El Forum - 12-21-2008

[eluser]Unknown[/eluser]
I have created a subfolder under controllers i.e. "employment".
My controller class is:

Code:
<?php
  class Employment extends Controller{
    
      function index(){
        //$this->load->view("employment/index_view");
        $this->load->view('employment/index_view');
      }
  }
?>

M accessing using this url: "http://localhost/code_igniter/employment/"

This is throwing error,
Object not found!


Created a subfolder under controllers... - El Forum - 12-21-2008

[eluser]Senthilguru[/eluser]
Hi,

just do this...

In your config folderthere will be a file routes.php in that just put this code

Code:
$route['employment']    = 'employment/employment/index';


then try http://localhost/code_igniter/employment/....it will work

have a nice day,

Thanks and regards,
senthilguru.e
Cogzidel Templates(www.cogzideltemplates.com)