Hi,
I'm using SMF 1.0.6 and Coppermine 1.4.4. Bridged. Everythings works very well so far.
Now I want to use a Custom Header ( that means I'm simply using the custom header function in the admin area, there I name a PHP file ).
It includes the PHP file. No problem. Now I want to use a SMF SSI function in the PHP.
For testing purpose I just tried to do something very simple like echoing my username:
<?php
require ( '../smf/SSI.php' ) ;
if (!$user_info['is_guest'] )
{
echo $user_info['username'] ;
}
?>
But it don't work at all. The path to the SSI.php should be correct and I'm logged in ( I check that several times hehe ). So it should just echo my username. But nothing happens. If I add an "else" statement then it works. So the $user_info[] seems to be empty.
What's wrong here ?
Looking forward to your help.
Regards,
Martin
SSI.php is already included by the bridge system for authentication purposes, attempting to subsequently require it in your script would have no effect. This means you will need to make the variables you need global in your custom header file otherwise they will not be in scope.
Ok now it works. Thanks for your help!
Quote from: Nibbler on May 01, 2006, 12:30:38 PM
SSI.php is already included by the bridge system for authentication purposes, attempting to subsequently require it in your script would have no effect. This means you will need to make the variables you need global in your custom header file otherwise they will not be in scope.
hello!
how do i do that?
can you give a hint to a coding newbie?
would be very nice.
thank you in advance.
http://www.php.net/manual/en/language.variables.scope.php