Current Working Directory

I just want to verify that in console applications there is no way to get the current working directory. If you use getcwd, it just gives you the virtual Data directory. You can get the directory of the exe itself, but that is it. Is that correct?

It’s not possible directly but there is a workaround.
In the PHP.INI section in ExeOutput, add this line to the end of your PHP.INI:

exepath="%EXOPHPEXEPATH%"

Then, with PHP, you can read this entry:

$valeur = ini_get("exepath");
echo $valeur;
1 Like