I am facing a weird problem for 1 hour, I searched it on internet and this forum but couldn't find the Solution that I am looking for. I am using codeigniter framework to develop a small product. So here is my problem:
I have a controller named music.php which simply loads the template view:
/* music.php */
public function index()
{
$data['main_content'] = 'admin/music/list';
$this->load->view('admin/template', $data);
}
The content of admin/template.php is as follows
<?php $this->load->view('header'); ?>
<?php $this->load->view($main_content); ?>
<?php $this->load->view('footer'); ?>
the header.php and footer.php are located on the same folder as template.php. Now when I tried to access the file, browser shows the error "Unable to load the requested file: header.php". But instead if I use require_once("header.php") it works fine. Can any one solve this problem
Edit 1: my route.php is
$route['default_controller'] = "homepage";
$route['404_override'] = '';
$route['admin'] = 'admin/music';