There are two different possibilities to do this: the first one is to use the LAMP (Linux-Apache-MySQL-PHP) system we set up in The LAMP suite section of Chapter 1, Installing the Developing System, while the second one is to use the PHP built-in web server.
In the first step, we must create a file named
turn.php in the
/var/www/ directory of the BeagleBone Black with the following content:
<?php # 1st part - Global defines & functions define("value_f", "/sys/class/gpio/gpio66/value"); # 2nd part - Get the current led status $led_status = intval(file_get_contents(value_f)); # 3rd part - Render the led status by HTML code ?> <html> <head>...