Use app location directory


#1

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.


#2

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


#4

I use: dirname(DIR)