What is the difference between $this->loadView() and $this->load->view() in codeigniter?

Asked

Viewed 28 times

0

I’m refactoring a code, I saw that the previous programmer wrote $this->loadView(), I’ve always used $this->load->view() since I learned Codeigniter. And I found that the behavior is the same, both load the view, however a behavior in one of the files showed different behavior. So I raised this question, whether there are differences between these two writings.

  • 1

    sure that $this->loadView() is really codeigniter? has nothing about it in the codeigniter documentation...

  • Yes, I also searched the documentation and did not find, but the code I took is written this way, so I found it very strange. During refactoring I even switched to $this->load->view(), some worked normally, others gave error... So I believe there must be some difference between them.

  • But it doesn’t necessarily mean that it is codeigniter, it can be a method that was created by someone, just as you said the previous programmer used so it can be q even he has created.

No answers

Browser other questions tagged

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