PHP – Run Shell Command

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 =)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.