Use app location directory


I have a consol app. My php script need the full path of the application. I try exo_getglobalvariable but this not worked in consol app. If my app is located in C:\Test-app\myapp.exe, I need to use the same directory: C:\Test-app. How can I read the location of my app.


Try $argv to retrieve the command line that will contain the path of the EXE file.


I use: dirname(DIR)