Is it possible to pass parameters from php to a shell script. For ex:
<?php
$var = "testfolder";
shell_exec('sh /path/test.sh');
?>
Shell script (test.sh):
sudo mkdir $var /path/
I want the value in php $var
to be exported to the shell script to be able to create a folder with the name as in the variable.
Is this possible?
I know already how to insert a variable into a string, but i can't figure out how to rewrite the line shell_exec
to export this variable to my shell script
Thanks!