i've tested both of these to make sure that shell_exec() will actually work.
this is putting the command in the arguments
PHP Code:
<?
$output = shell_exec('touch new_file.txt');
echo $output;
?>
and this would do the same thing except putting an executable filename in the arguments
PHP Code:
<?
$output = shell_exec('script.sh');
echo $output;
?>
both of these will create 'new_file.txt' ( assuming script.sh just contains the same command as my first example. )
the problem is when you use any command that generates output. i tested it with 'echo' commands and also 'rm' commands that should not detect a file and give error output.
this bugs the heck out of me.