shell_script php code example Example: php shell script <?php $output = shell_exec('cat /etc/hosts'); echo "<pre>$output</pre>"; ?>