예제 #1
0
<?php

include "template.php";
login_auth();
$state = $_POST['state'];
$led_number = $_POST['led_number'];
if ($state === '0') {
    ssh2_cmd('sh /var/www/script/ledoff.sh ' . $led_number);
} else {
    ssh2_cmd('sh /var/www/script/ledon.sh ' . $led_number);
}
예제 #2
0
<?php

include "template.php";
login_auth();
$state = $_POST['state'];
$gpio_number = $_POST['gpio_number'];
if ($state === '0') {
    ssh2_cmd('sh /var/www/script/gpiooff.sh ' . $gpio_number);
} else {
    ssh2_cmd('sh /var/www/script/gpioon.sh ' . $gpio_number);
}
예제 #3
0
function gpioInit()
{
    ssh2_cmd("sh /var/www/script/gpioInit.sh");
}