moved creation of marker file
parent
4bffffc256
commit
c20a864700
2
recent
2
recent
|
|
@ -1 +1 @@
|
||||||
Temperatur: 13.43 C<br>Luftfeuchtigkeit: 89.5 %<br>Helligkeit: 0.01 Lux<br>Luftdruck: 982.473mbar
|
Temperatur: 10.37 C<br>Luftfeuchtigkeit: 70.2 %<br>Helligkeit: 0.01 Lux<br>Luftdruck: 981.66mbar
|
||||||
|
|
@ -7,11 +7,17 @@ $db=new DBLib();
|
||||||
|
|
||||||
$db=new DBLib($database['host'],$database['user'],$database['password'],$database['database']);
|
$db=new DBLib($database['host'],$database['user'],$database['password'],$database['database']);
|
||||||
|
|
||||||
|
function markerFile($file="newData"){
|
||||||
|
if (! file_exists($file)){
|
||||||
|
file_put_contents($file,"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$dir=scandir('data');
|
$dir=scandir('data');
|
||||||
$temp=$humi=$ambi=$baro=0;
|
$temp=$humi=$ambi=$baro=0;
|
||||||
foreach($dir as $file){
|
foreach($dir as $file){
|
||||||
if(validFile($file)){
|
if(validFile($file)){
|
||||||
file_put_contents('newData',"");
|
markerFile();
|
||||||
echo "parsing file: ".$file."\n";
|
echo "parsing file: ".$file."\n";
|
||||||
importLogfiletoDatabase('data/'.$file);
|
importLogfiletoDatabase('data/'.$file);
|
||||||
//recent records on frontpage:
|
//recent records on frontpage:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue