Welcome Guest, Not a member yet? Register   Sign In
How to view a file in another file?
#1

Hello, I'm trying to load/echo another view file in a view file.
In ci3, we used,
<?php $this->load->view ('Profile/status'); ?> 
to load the view. What do we use in ci4? I've done,
<?php echo view('Profile/status'); ?>
However, it came out in error saying the file is invalid.....I also have declared the module in Autoload.
This is my modules structure for Views folder:
profile/Views/Profile/status.php
Reply
#2

See https://codeigniter4.github.io/CodeIgnit...aced-views
Reply




Theme © iAndrew 2016 - Forum software by © MyBB