Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPerry Stripling
20,210 PointsCan't figure this out, tried all possible combos and not getting it.
wants relative path from one folder to another.
5 Answers
Kevin Korte
28,149 PointsAre you trying to do question #2?
Question one is asking for a root-relative path which is what Peter posted. Question two is asking for a relative path.
The answer to question is you have to use a php include, and you have to go back down to folders, and than go into two folder structures to find the file it wants include.
Peter Ramsing
16,814 PointsJust for kicks, here's question #2.
<?php require_once($_SERVER["DOCUMENT_ROOT"] . "../../config/company.php"); ?>
Peter Ramsing
16,814 PointsTake a look here: Absolute, Relative and Root-Relative URLs
Perry Stripling
20,210 PointsI tried No Slash, Just slash, Dot slash and Dot Dot slash. None worked, so I'd really like to know what the answer is. Thanx!
Peter Ramsing
16,814 PointsGive this a go:
<p><a href="/contact/">Contact</a></p>