= strtotime($startDate) && strtotime($rowDate) <= strtotime($stopDate) ) { $row[0] = date('d.m.Y H:i:s', strtotime($row[0])); fputcsv($output, array_slice($row, 0, self::FIELDS - 1)); } } fclose($output); fclose($f); exit; } else { throw new \Exception('Error'); } } public function clearFileLog() { $file = \Core\Log\FileLog::getFile(); if (file_exists($file) && filesize($file) > 0) { $f = fopen($file, "w+"); fclose($f); } else { throw new \Exception('Error'); } } }