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 trial

PHP PHP User Authentication Building the Library Adding Books

why is __DIR__ included all the time?

why is DIR included all the time? is there any updated way to skip it?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Rafail Mavrogordatos! There becomes a problem if/when you have a scenario when you move files or have something where file A includes file B which in itself includes file C. The relative path is going to change as you traverse these files.

Take a look at this stackoverlow answer and see if it clears things up.

Hope this helps! :sparkles: