So I'm trying to get this to work. I have a .py file that turns the servo, and it works, but I'm trying to run it through a browser.
So I installed apache and php, and I made .php file which, when opened in a browser, runs commands in the terminal:
<?php
system("gpio -g mode 4 out");
system("gpio -g write 4 1");
?>
It successfully turns on the led. But I tried making a .php file that would run the .py file which spins the servo:
<?php
system("python /home/pi/Desktop/python/servo.py");
?>
I also tried adding sudo in there but didn't get any results. If anyone could help me I'd really appreciate it!