starting sh file via php - Raspberry Pi Forums
hello have code
why not work?
code: select all
<form method="post"> <input type="submit" id="submit" name="submit" value="start"> <input type="submit" id="submit" name="submit" value="stop"> </form> <?php if ($_post["submit"] == "start") {echo "started!"; shell_exec('sh /home/ismet/usbrelayon.sh');} if ($_post["submit"] == "stop") {echo "stopped!"; shell_exec('sh /home/ismet/usbrelayoff.sh');} ?>
any clues in webserver error log?
/var/log/apache2/error.log (if using apache)
/var/log/apache2/error.log (if using apache)
raspberrypi
Comments
Post a Comment