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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -