phpBB Root Path

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp

phpBB Root Path

Post by Tripp »

Ok, so I have basic custom pages /about/, /rules/ etc but now I'm trying to make a credits section under the about me but I can't seem to figure out how to make it go back 2 folders.

So it's like this, domain.com/about/credits/

For my about, I have:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
Obviously it works fine, when I made the credits folder within the about folder and tried:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '.../';
It doesn't work. Any insight to this?
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
5942marine
Registered User
Posts: 48
Joined: Wed Apr 23, 2008 9:55 pm

Re: phpBB Root Path

Post by 5942marine »

I think it needs to be like this.

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../';
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp

Re: phpBB Root Path

Post by Tripp »

Worked perfectly, mind explaining why it worked? Just trying to learn here. LIke, what's

./
../
../../
etc
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: phpBB Root Path

Post by ameeck »

./ means in the same directory relative to the spot your at.

../ means one directory up relative to the spot your at.

For example the URL that is shown when I am writing this post: http://www.phpbb.com/community/posting. ... &t=1537115

If I would go ../ from this URL, I would get to http://www.phpbb.com, because I went up one directory from the community/ directory. You can go unlimited steps up until you reach a top-level directory.

If a path begins with a slash / it is absolute on the other hand and is led from the root folder.
User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp

Re: phpBB Root Path

Post by Tripp »

Ahhhh, I see, you made it crystal clear, thanks!
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs

Return to “[3.0.x] Support Forum”