file = ''; while (!feof($handle)) { $this->file .= fread($handle, 8192); } trigger_log(SYSLOG_DEBUG, 'Closing file "' . $filename . '"', __FILE__, __LINE__); fclose($handle); trigger_log(SYSLOG_INFO, 'Reading from file "' . $filename . '" is done', __FILE__, __LINE__); } catch (Exception $err) { trigger_log(SYSLOG_ERR, 'Reading from file "' . $filename . '" failed', __FILE__, __LINE__); } } public function getFile() { return $this->file; } }