$infoLog, 'error' => $protPath . "\\fehlerbericht.json", 'gcstarter' => $protPath . "\\gcstarter.json", 'gcstruct' => $protPath . "\\gcstruct.json" ); $endTime = date("H:i"); $logs = checkProtocolDirectory($protPath); $errorCount = count($logs); if ($startTime) { if (strlen($startTime) == 4) { $startTime = "0" . $startTime; } $logs = checkProtocolDirectory($protPath, true); file_put_contents($attachments['error'], json_encode($logs)); sendStatusMail($customer, $startTime, $endTime, $errorCount, $batchFile, $attachments); } ?>