plop.php 589 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. $data='./data/logs.dat';
  3. function loadLogs($file) {
  4. $string = file_get_contents($file);
  5. return json_decode($string, true);
  6. }
  7. $logs=Array();
  8. if(file_exists($data))
  9. $logs=loadLogs($data);
  10. $uuid=uniqid('log',true);
  11. echo "UUID = $uuid<br>";
  12. echo '
  13. <form method=post>
  14. Filament <input type=input name=filament><br>
  15. Vitesse <input type=input name=v0><br>
  16. T° Extrudeur <input type=input name=te><br>
  17. T° Bed <input type=input name=tb><br>
  18. Fan <input type=input name=fan><br>
  19. ID <input type=input name=id><br>
  20. </form>
  21. ';
  22. echo "<pre>";
  23. print_r($logs);
  24. echo "</pre>";
  25. ?>