I need to give a path to a folder as an input to a php script so that my php script will do certain things depending on the path. From the linux terminal (Debian), I run my program with the command:
php /path/name/example.php pwd
You need to use command substitution using
$() or back ticks.
$php prog.php $(pwd)
$() executes the command, (
pwd here) and pass the output as argument to the php script.