I have two custom pages on my site. Both call and insert a seperate php file into their <body>.
This is
the first one, and this is
the second one.
I'm using this plugin for the first one:
Code:
ob_start();
include('statsinner.php');
$includedphp = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('cpage_Statsmain', array('includedphp' => $includedphp));
And this for the second one:
Code:
ob_start();
ob_clean();
include('schoolstatsinner.php');
$otherphp = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('cpage_Stats', array('otherphp' => $otherphp));
Then I reference the called PHP files in their respective templates using {vb:raw includedphp} and {vb:raw otherphp}.
I can't figure out why, but I can only get one of the two pages working at a time. If I enable both plugins, the second page doesn't work (see the error). If i disable the first plugin, the second page works. If I disable the second plugin, just the first page works. :S
I think this might be related to clearing the object buffer. Can anyone suggest what the problem is and possibly the solution might be?