I am trying to pass variables from php to bash and im not sure how to get this to work. this is what i am trying:
$last_line = system('/home/www/public_html/domain.com/script/ls $var1 $var2', $retval);
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
but nothing seems to get passed to bash. I want to be able to do this to create new folders, give ownership and permission changes to those folders, and later create new virtualhosts with a php interface.
sudo mkdir test
sudo chown -R www-data:www-data /home/www/public_html/domain.com/script/test
echo -e "var1: $1, var2: $1"