Created
January 1, 2017 00:56
-
-
Save mattConn/ce6570d064d8fb3e2bfac2b30c002b3e to your computer and use it in GitHub Desktop.
Preserve formatting when displaying exec's returned string.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
exec("$command 2>&1 &", $output); | |
foreach ($output as $line) { | |
echo "$line\n"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment