Log.xml: Difference between revisions

65 bytes added ,  17:25, 31 May 2020
m
no edit summary
m (added link to post in support forum)
mNo edit summary
Line 8: Line 8:


<code>
<code>
  // =======================================================
//====================================================
//  This snippet is used for Cumulus 1 with XML based diary
//  This snippet is used for Cumulus 1 with XML based diary
// =======================================================
// =======================================================
$fh = fopen($snowDiary, 'r');
$fh = fopen($snowDiary, 'r'); // $snowDiary has to contain full path based on root or relative to where your script is
if ($fh == FALSE)
if ($fh == FALSE)
{
{
echo 'ERROR - cannot access weather diary';
echo 'ERROR - cannot access weather diary';
}else{
}else{
if($debug) echo 'Success, database ' . $snowDiary . ' is open' . PHP_EOL;
if($debug) echo 'Success, database ' . $snowDiary . ' is open' . PHP_EOL;
$data = fread($fh, filesize($snowDiary));
$data = fread($fh, filesize($snowDiary));
Line 56: Line 56:
$Entry = Null; // Other variables were previously set to values appropriate for the lowest temperature
$Entry = Null; // Other variables were previously set to values appropriate for the lowest temperature
goto snowDone;
goto snowDone;
}
snowDone:</code>
snowDone:</code>




[[Category:Log Files]]
[[Category:Log Files]]
5,838

edits