Executing a shell script in php

Just found this, saving for later reference:

<?php
$output = shell_exec('/path/to/file.sh');
echo $output;
?>

Leave a Reply

Your email address will not be published. Required fields are marked *