Return to Snippet

Revision: 16002
at July 22, 2009 15:10 by traeregan


Initial Code
<?php

function execOutput($command) {
    $output = array($command);
    exec($command.' 2>&1', $output);
    return implode("\n", $output);
}

echo execOutput('help');
?>

Initial URL
http://xantorohara.blogspot.com/2008/09/php-exec-output.html

Initial Description

                                

Initial Title
Capture exec() output

Initial Tags

                                

Initial Language
PHP