MyBB Community Forums

Full Version: global.php directory?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to create a new page within a folder. I've come across a little problem though, since global.php isn't in the same directory as this new page file its throwing a php error.

What's the correct path for the file to locate global.php outside of its /staff/ directory?

Right now its
require "/global.php"; // (1b)
Which it can't find, I've also tried two slashes as well as including a period but nothing.

Help would definitely be appreciated, I'm sorta stuck.
require_once "../global.php";

for the relative paths :
./ => current directory
../ => parent directory
(2017-03-30, 02:31 PM).m. Wrote: [ -> ]
require_once "../global.php";

for the relative paths :
./ => current directory
../ => parent directory

Ace! Thanks for teaching me that! Smile

I don't suppose you know why avatars aren't showing up? I've got a header that displays an avatar and it looks like a broken avatar image on that page only, presumably something to do with the directory the page is in. My guess is I need to include a template or something.
If you right click on an image, you can check the image path to see if it is wrong.