CodeIgniter 404 Page Not Found, but why?

前端 未结 11 2386
Happy的楠姐
Happy的楠姐 2020-12-11 14:48

I am using CodeIgniter for two applications (a public and an admin app). The important elements of the document structure are:

/admin
/admin/.htaccess
/admin         


        
11条回答
  •  悲哀的现实
    2020-12-11 15:17

    It happens cause of multiple reasons but the answer missing above there's the "className" while extending your controller.

    Make sure your class name is the same as your controller name is your controllers. e.g., If your controller name is Settings.php, you must extend the controller like.

    class Settings extends CI_Controller
    {
    // some actions like...
         public function __construct(){
         // and so and so...
         }
    }
    

提交回复
热议问题