I have a file outside of vb with the following code:
Code:
<?php
//Store current directory
$cwd = getcwd();
echo getcwd().'\n';
//change to forum directory
chdir ('../forum');
echo getcwd() . '\n';
require_once('global.php');
if ($vbulletin->userinfo['userid'])
{
echo 'Welcome ' . $vbulletin->userinfo['username'] . ', you have logged in.';
}
else
{
echo 'Not logged in...';
}
//return to original directory
chdir ($cwd);
echo getcwd().'\n';
?>
I am getting this error when I use it :
Unable to add cookies, header already sent.
Can anyone help??