CodeIgniter default controller in a sub directory not working

前端 未结 9 1683
醉话见心
醉话见心 2020-11-29 10:15

My default_controller in the routes configuration is set as \"home.php\".

I have a sub directory for my controllers, lets call it \"folder\". So if I visit http://my

9条回答
  •  野性不改
    2020-11-29 10:53

    In application/config/routes.php just add this

    $this->set_directory( "user" );
    $route['default_controller'] = 'home/index';
    

    Here, user is my folder name. Then in default controller you can call any controller that is in user folder following by function name

提交回复
热议问题