<?php
$realpath = dirname(__FILE__);
include_once "$realpath/content/conf/ubuntucenter.php.inc";
function displayhead() {
$realpath = dirname(__FILE__);
include_once "$realpath/content/conf/ubuntucenter.php.inc"; <---- Contains variable
include_once "$realpath/content/themes/$theme/header.php"; <---- attempts to use the variable
}
function displayfoot() {
include_once "content/themes/centerv1/footer.php";
}
?>
$realpath/content/conf/ubuntucenter.php.inc sets the varible $theme but when I try to include the variable in the next line it is null. I am very new to php and am sure this is just a simple mistake.
Thanks in advanced,
Travis!