Welcome Guest, Not a member yet? Register   Sign In
URL Problems with Includes.
#1

[eluser]austintbiggs[/eluser]
I'm trying to include
Quote:views/body/includes/document_head.php
from within
Quote:views/body/layout.php

using
Code:
<?php $baseurl = base_url(); $this->load->view($baseurl . 'body/includes/document_head.php'); ?>

It's just not working, I'm bad when it comes to URL mapping, anyone have any advice?

Thanks.
#2

[eluser]toopay[/eluser]
To use load->view, you doesn't need to provide the full path. Its should...
Code:
$this->load->view('body/includes/document_head');
#3

[eluser]patwork[/eluser]
You can't access local files with base_url(), because it's URL to your homepage. Try defined constant APPPATH.
#4

[eluser]toopay[/eluser]
@patwork

He wants to include/load a view files within a view files, not access it.




Theme © iAndrew 2016 - Forum software by © MyBB