-
-
Save humbletiger/ec9483f7d0549d7fb2589621d329945a to your computer and use it in GitHub Desktop.
PHP multiline shell exec command
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 | |
$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