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 trialWei-Ting Chen
7,632 PointsHow to know when should I use BASE_URL or ROOT_PATH?
Hi there, I know one is the root of the file and the other is the root of the server file,but how do you know when to use one or another? What's the difference in result?
1 Answer
ixrevo
32,051 PointsHi!
BASE_URL is a part of an URL, address that you paste into the browser's address field.
ROOT_PATH is a file system path, path that you use to open files and folders in OS X Finder or Windows Explorer.
So, when you refer to urls, you need to use BASE_URL, but when you work with files and folders on server you should use ROOT_PATH.