Search code examples
phpcodeignitercodeigniter-2

codeigniter can't load my application/core class in my live server


I have a class in application/core/MY_input.php named MY_Input. I want to override the existing post method that return false this is the code.

class MY_Input extends CI_Input {
      function __construct()
      {
        parent::__construct();
      }

      function post($index = NULL, $xss_clean = FALSE)
      {
        $post = parent::post($index, $xss_clean);
        return ($post !== FALSE) ? $post : NULL;
      }
}

but the i get the original post method, the code work fine in my localhost but in my live server it didn't i dont know why.

information:

-CodeIgniter 2.2

-server :php v5.5.9-1 ubuntu 4.7

-localhost :php v5.4.27


Solution

  • Ubuntu/linux files are case sensitive.

    MY_input.php Should be MY_Input.php the same as the class name MY_input