Guest User

Untitled

a guest
Jun 21st, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. if(!file_get_contents("soubor.txt", 0)) {
  2. $soubor = fopen("soubor.txt","w+");
  3. $funkceled1 = 10;
  4. fwrite ($soubor, $funkceled1);
  5. fclose ($soubor);
  6. }
  7.  
  8. if (isset($_GET['on1']) && file_get_contents("soubor.txt", 2)) {
  9. shell_exec("/usr/local/bin/gpio -g write 14 1");
  10. $soubor = fopen("soubor.txt","w+");
  11. $funkceled1 = 1000;
  12. fwrite ($soubor, $funkceled1);
  13. fclose ($soubor);
  14. }
  15. else if (isset($_GET['on1']) && file_get_contents("soubor.txt", 4)) {
  16. shell_exec("/usr/local/bin/gpio -g write 14 0");
  17. $soubor = fopen("soubor.txt","w+");
  18. $funkceled1 = 10;
  19. fwrite ($soubor, $funkceled1);
  20. fclose ($soubor);
Add Comment
Please, Sign In to add comment