codeigniter没有检测到任何控制器

i am using codeigniter 3. i have created a simple controller and when i try to access the controller am getting the 404 error.

my controller

        <?php
        defined('BASEPATH') OR exit('No direct script access allowed');

        class home extends CI_Controller {

            /**
             * Index Page for this controller.
             *
             * Maps to the following URL
             *      http://example.com/index.php/welcome
             *  - or -
             *      http://example.com/index.php/welcome/index
             *  - or -
             * Since this controller is set as the default controller in
             * config/routes.php, it's displayed at http://example.com/
             *
             * So any other public methods not prefixed with an underscore will
             * map to /index.php/welcome/<method_name>
             * @see http://codeigniter.com/user_guide/general/urls.html
             */
            public function index()
            {
                echo "Working fine";
                $this->load->view('comman/header.php');
                $this->load->view('home/home.php');

            }
        }

config file

$config['base_url'] = 'http://localhost/annaiplan/';

$config['index_page'] = 'index.php';

$config['url_suffix'] = '';

.htaccess

Options +FollowSymLinks
RewriteEngine on

RewriteBase /annaiplan
RewriteCond $1 !^(index\\.php|resources|robots\\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

when i try to access the app am getting 404 error.

http://localhost/annaiplan/home/

enter image description here

first always controller file name should be 'Home' and in class its class name should be Home extends.... second you need to change default controller from routes.php path to rout.php ==== root folder/application/config/routes.php

change from $route['default_controller'] = 'welcome';to $route['default_controller'] = 'Home';

In htaccess file

Change:

RewriteBase /annaiplan

To:

RewriteBase /

And you can also replace htaccess code with this.

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]