Skip to content

Instantly share code, notes, and snippets.

@fvosberg
Created May 27, 2014 09:46
Show Gist options
  • Save fvosberg/6ac894104380de923f8a to your computer and use it in GitHub Desktop.
Save fvosberg/6ac894104380de923f8a to your computer and use it in GitHub Desktop.
Shell execute for debugging
<?php
function shelli($command){
$ouput = [];
$return = '';
exec($command, $output, $return);
echo "<hr><hr>\n";
echo "Executing \"$command\" with return value \"$return\".\n";
echo "<hr><pre>\n" . implode($output, "\n") . "</pre><hr><hr>\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment