Hi, I tried using this code to get some data for a forum:
Code:
<?php
include('global.php');
echo $vbulletin->userinfo['userid']."<br/>";
echo $vbulletin->userinfo['username']."<br/>";
echo $vbulletin->userinfo['logouthash']."<br/>";
?>
I placed the php page inside the forum directory and it works as expected, outputs the data for the user that is logged in.
However if I add chdir('forum'); before including global.php and place it outside of the forum directory in my main website directory it outputs: 0, Unregistered and logouthash has no output.
How can I get this to work outside of the forum directory ?
Code:
<?php
include('global.php');
echo $vbulletin->userinfo['userid']."<br/>";
echo $vbulletin->userinfo['username']."<br/>";
echo $vbulletin->userinfo['logouthash']."<br/>";
?>
I placed the php page inside the forum directory and it works as expected, outputs the data for the user that is logged in.
However if I add chdir('forum'); before including global.php and place it outside of the forum directory in my main website directory it outputs: 0, Unregistered and logouthash has no output.
How can I get this to work outside of the forum directory ?