Welcome Guest, Not a member yet? Register   Sign In
Calling view inside view not working anymore
#1

Hi,

Calling view inside view not working anymore.

I have this code in my view

<div>
<?php $this->load->view('client');?>
</div>

and I get this error "Call to a member function view() on null"
Reply
#2

(This post was last modified: 01-06-2024, 08:01 PM by luckmoshy.)

Is it Ci 3 or C4 if 4+ use
PHP Code:
view('client'// or subfolder/client 

https://codeigniter4.github.io/CodeIgnit...views.html
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#3

(01-06-2024, 07:57 PM)luckmoshy Wrote: Is it Ci 3 or C4 if 4+ use
PHP Code:
view('client'// or subfolder/client 

https://codeigniter4.github.io/CodeIgnit...views.html

well I posted it here on CI3.

I got a runaround, I just use the
PHP Code:
require_once() 
.  Actually I ask it from other framework (I tried calling view inside a view using their framework) because I am getting an error too.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB