PHP PHP User Authentication Building the Library Adding Books

Rafail Mavrogordatos
Rafail Mavrogordatos
5,324 Points

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
Jennifer Nordell
Treehouse Staff

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: