Forums / Developer / Error: own php script inside eZp (2)
John van der Boom
Monday 02 June 2003 8:55:11 pm
I'm trying to make a php script run in eZp. Following the how-to: "How can I use my own php script inside eZp?" I did the following: 1. Edit the eZp index.php file: Between: - $scriptStartTime = microtime(); - ob_start(); Added: - // phpBB login page - ob_start(); - define('override_phpbb_root_path', 'forum/'); // path to the phpBB folder (if we're not in it), no beginning slash - @include(override_phpbb_root_path . 'index_login.php'); - $phpbb_variable = ob_get_contents(); - ob_end_clean(); - // end phpBB login page 2. In the template where I want this to script to show up I added: - {$phpbb_variable} Now I'm getting this error from EzDebug" " Unknown template variable 'phpbb_variable' in namespace ''What is going wrong here?
Follow Up:
I've discover that when I echo $php_variable in index.php I do see the result of the script. So something is wrong with the {$php_variable} in the template. I also tested the idea of showing a variable declared in index.php in the templates like tis: Added in index.php: $test=1; Added this in a random .tpl file: ($test} Result EzDebug: Unknown template variable 'test' in namespace '' So the idea of passing a variable declared in index.php to a template isn't cleared to me. Anyone any idea?