I am trying to ultimately use php\'s shell_exec
function to create new Linux users. I am, however, running into problems even with the debugging. Here is my code
Please use my function found here.
Run the following code and tell us its output:
echo '';
print_r(execute('pwd'));
print_r(execute('touch test.txt'));
Edit: If you want to make my script more OO oriented:
function execute_o($cmd,$in){
$out=execute($cmd,$in);
if($out['return']!=0)
throw new Exception('Error '.$out['return'].': '.$out['stderr'].'.');
}