Welcome Guest, Not a member yet? Register   Sign In
contents of php file shows in browser window
#8

[eluser]GlenW[/eluser]
[quote author="TWP Marketing" date="1350416902"]
May not be related, but you are loading three views in your controller:
[/quote]

Probably because the tutorial does the same:

Code:
public function view($page = 'home')
{
  
if ( ! file_exists('application/views/pages/'.$page.'.php'))
{
  // Whoops, we don't have a page for that!
  show_404();
}

$data['title'] = ucfirst($page); // Capitalize the first letter

$this->load->view('templates/header', $data);
$this->load->view('pages/'.$page, $data);
$this->load->view('templates/footer', $data);

}

Also, I do the same in my controllers and it works fine.


Messages In This Thread
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:08 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:18 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:24 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:24 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:27 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:48 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 12:57 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 01:00 PM
contents of php file shows in browser window - by El Forum - 10-16-2012, 01:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB