www/getispindellog.php

changeset 601
112c278be803
parent 580
9cd6873bda75
child 627
f1a7c14d5601
--- a/www/getispindellog.php	Tue Jan 21 11:09:25 2020 +0100
+++ b/www/getispindellog.php	Tue Jan 21 21:16:26 2020 +0100
@@ -8,6 +8,12 @@
 	$code = "TB0091 Kwik";
 
 $filename = 'log/ispindel/' . $code . '.log';
+if (! file_exists($filename)) {
+        header("Content-type: application/json");
+        echo '{}';
+        exit;
+}
+
 
 /*
  * 2014-11-15 18:39:12,TEMPERATURE,PLATO,SG,BATTERY,ANGLE,INVERVAL,UUID
@@ -42,4 +48,3 @@
 }
 header("Content-type: application/json");
 echo json_encode($logs);
-//echo $lines . ' lines' . PHP_EOL;

mercurial