Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved global.php directory?
#1
Not Solved
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.
Reply
#2
Not Solved
require_once "../global.php";

for the relative paths :
./ => current directory
../ => parent directory
Reply
#3
Not Solved
(03-30-2017, 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.
Reply
#4
Not Solved
If you right click on an image, you can check the image path to see if it is wrong.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)