starting sh file via php - Raspberry Pi Forums


hello have code

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');} ?> 
why not work?

any clues in webserver error log?

/var/log/apache2/error.log (if using apache)


raspberrypi



Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62