Error in site after server change

0

The page loads this error below:

  

Message: Non-static method util :: loadView () should not be called   statically, assuming $ this from incompatible context

Code where the message indicates the error:

class Home extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
    }

    function index() {
        util::loadView('home/index');
    }
}
    
asked by anonymous 03.10.2017 / 22:28

1 answer

1

It looks like you want to load a view . The right thing to do is to use the following command:

class Home extends CI_Controller {
    public function __construct() {
        parent::__construct();
    }

    function index() {
        $this->load->view('home/index');
    }
}
    
03.10.2017 / 22:33