I have self-writed sh script, which contains contruction like "cd directory"
It is successfully running through terminal
. /path/to/script.sh param1 param2
I want to run this script through PHP
shell_exec('. /path/to/script.sh param1 param2');
shell_exec('. /path/to/script.sh "param1" "param2"');
not running correctly
shell_exec('/bin/bash /path/to/script.sh param1 param2');
running, but directory changing is not working
Please, help. Thank you in advance
~as HOME is different among users.cd directory, isdirectorya relative path or an absolute one?