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