Quote:
Originally Posted by Lynne
And is the global.php script included in your custom script? I fyou have that script included, then you can use basic vbulletin code.
|
Yes i tried to include the global file but it throws an error as below.
Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/ftwforum/public_html/global.php on line 15
So i assume this is because i am using a directory instead of the root for my script location?
--------------- Added [DATE]1287284215[/DATE] at [TIME]1287284215[/TIME] ---------------
Anyone got any ideas what i am doing wrong?
I can get it to work in the root directory using the below code.
PHP Code:
<?php
require_once('./global.php');
if ($vbulletin->userinfo['userid']!=0) {
echo "Welcome Back, <b>";
echo $vbulletin->userinfo['username'];
} else {
echo "Sorry No Joy, <b>";
}
?>
But if i try this in a lower directory and change the location to global.php to ../global.php i get errors.
Normally errors like this.
Code:
Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/ftwforum/public_html/global.php on line 15
Now i tried defining the root like so.
define( ROOT_PATH , "./" );
But that did nothing either.
I know this is a simple answer but i am really not that good with PHP and even less skilled with VB. So any help here would be appreciated.