Posted By

jdstraughan on 07/09/08


php Shell linux commend shellexec

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Linux shell commands from php script

 / Published in: PHP


The “2>&1″ bit tells to pipe the standard error to the standard output. Otherwise the standard error may not be outputted by the system and you won’t have a way to troubleshoot your script.

  1. $output=shell_exec('command 2>&1');

Report this snippet  

You need to login to post a comment.