Quote:
Originally Posted by kh99
Sorry, I probably confused you with my error. This should work:
PHP Code:
ob_start();
include('/home/XXXX/public_html/bh_includes/head_common.php');
$includedphp = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('header', array('includedheader' => $includedphp));
with this in the header template: {vb:raw includedheader}
(the variable names needed to match in the ob_get_contents() and preRegister lines).
|
That worked. Thanks a bunch.
--------------- Added [DATE]1314819916[/DATE] at [TIME]1314819916[/TIME] ---------------
I must the most idiot on this forums.
I'm trying to include a second php file (for footer this time) and am having problems again.
This time this is what im using:
Code:
ob_start();
include('/home/XXXX/public_html/bh_includes/footer-common.php');
$includedfphp = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('footer', array('includedfooter' => $includedfphp));
and {vb:raw includedfooter}
That doesnt work either. I changed the
includedphp to
includedfphp because using just the
includedphp didnt work. I assumed it was because that variable was already being used elsewhere so i changed it (nothing happened though)