Site error after server exchange

Asked

Viewed 30 times

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 message indicates error:

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

    function index() {
        util::loadView('home/index');
    }
}

1 answer

1


It seems you wish to carry one view. The right should be to use the following command:

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

    function index() {
        $this->load->view('home/index');
    }
}
  • At first it worked, thank you.

  • You’re welcome, I’m glad I could help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.