PHP PHP – Run Shell Command February 9, 2010 ykyuen Leave a comment You can make use of shell_exec() to run shell command in PHP. shell_exec.php <?php $output = shell_exec("whoami"); echo $output; ?> Open it in browser Done =) Share this:Tweet Click to share on WhatsApp (Opens in new window) WhatsApp Click to share on Telegram (Opens in new window) Telegram More Click to print (Opens in new window) Print Click to email a link to a friend (Opens in new window) Email Share on TumblrPocket Click to share on Reddit (Opens in new window) Reddit Like Loading... Related