update page now

Voting

: three minus zero?
(Example: nine)

The Note You're Voting On

joelhy
16 years ago
Here is a easy way to grab STDERR and discard STDOUT:
    add  '2>&1 1> /dev/null' to the end of your shell command

For example:
<?php
$output = shell_exec('ls file_not_exist 2>&1 1> /dev/null');
?>

<< Back to user notes page

To Top