Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!file_get_contents("soubor.txt", 0)) {
- $soubor = fopen("soubor.txt","w+");
- $funkceled1 = 10;
- fwrite ($soubor, $funkceled1);
- fclose ($soubor);
- }
- if (isset($_GET['on1']) && file_get_contents("soubor.txt", 2)) {
- shell_exec("/usr/local/bin/gpio -g write 14 1");
- $soubor = fopen("soubor.txt","w+");
- $funkceled1 = 1000;
- fwrite ($soubor, $funkceled1);
- fclose ($soubor);
- }
- else if (isset($_GET['on1']) && file_get_contents("soubor.txt", 4)) {
- shell_exec("/usr/local/bin/gpio -g write 14 0");
- $soubor = fopen("soubor.txt","w+");
- $funkceled1 = 10;
- fwrite ($soubor, $funkceled1);
- fclose ($soubor);
Add Comment
Please, Sign In to add comment