Welcome Guest, Not a member yet? Register   Sign In
Include Header File That Contains base_url()
#1

[eluser]TexMax007[/eluser]
Hello All,

Problem:

Editing error_404.php to match the layout of my site, I'm trying to include two files before the main content of the page. These files are called header.php and main_menu.php.

Code:
<?php

$path = APPPATH . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR;

include_once(realpath($path . 'header.php'));
include_once(realpath($path . 'main_menu.php'));

?>
... More HTML here

It's finding the file correctly, but stopping the render when it reaches the first occurance of base_url() in my header.php

The error_log on my server says
Quote:Call to undefined function base_url() in ... header.php on line 19

It's not acceptable to remove the base_url()'s in either of these files.

Is there any way to fix this?

Thanks,

Max


Messages In This Thread
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 10:33 AM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:24 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:40 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:45 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:47 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:48 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:50 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:53 PM
Include Header File That Contains base_url() - by El Forum - 01-27-2012, 01:53 PM
Include Header File That Contains base_url() - by El Forum - 02-15-2012, 10:59 AM
Include Header File That Contains base_url() - by El Forum - 02-15-2012, 11:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB