문제

I'm having some trouble with understanding the meaning of this snippet. I know that __ DIR __ refers to my absolute path, in my case /Applications/MAMP/htdocs

__ DIR __.'/../app'

Where is this path looking for the folder /app?

thx,

도움이 되었습니까?

해결책

This path means:

/Applications/MAMP/app

.. is the directory above. So he enters htdocs, enters the parentdirectory (which is MAMP) and then the directory app.

And for the knowledge: Should you ever see ., this means current directory. For example:

C:/Users/Admin/.

means exactly:

C:/Users/Admin/.

.. would mean:

C:/Users/

다른 팁

This is looking for /app under /Applications/MAMP/

__ DIR __.'/../app'
____________^

That's because you have the .. which means parent directory.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top