Created
January 29, 2019 20:00
-
-
Save miguelmota/34f22d3e00db7a41f0fd10f8372b31cb to your computer and use it in GitHub Desktop.
PHP multiline shell exec command
This file contains hidden or 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 | |
$cmd = <<<CMD | |
echo "hello \ | |
world" | |
CMD; | |
$output = shell_exec($cmd); | |
echo $output; // "hello world" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment