The current directory needs to be your forum directory (the directory that contains global.php) before including it. So do a chdir() to the forum dir, include global.php, then chdir() back if you need to.
Also, if you want to do the include inside a function, you need to declare some variables as global before you do the include (I keep forgetting what they are - if you want to do this, I'll try to find where someone posted it before).
|