codeigniter - How to access non-default view inside view folder in code igniter -
i know how display default view in code igniter. but, how can access other files inside view folder. example want display 'application/views/admin/index.php' isn't default view.
you can add sub folders in view so.
$this->load->view('admin/index');
is meaning.
codeigniter views
file name: example.php
<?php class example extends ci_controller { public function index() { $this->load->view('admin/index'); } }
folder structure
application application / views / application / views / admin application / views / admin / index.php
i not choose index.php name view rename name dashboard.php or thing. because have index.php in main directory.
Comments
Post a Comment