I'm writing code to produce an ICS file. The code I'm writing looks like this:
// Define the file as an iCalendar file
// Give the file a name and force download
header("Content-Disposition: inline; filename=aus_events.ics");
I then continue my code as normal to produce the contents of the file.
For some reason I get blank lines at the top of my file that sum the total number of records, and I checked the loop for any blank files being generated, but there are none.
I'm putting the whole output in one variable so I can remove any blank lines:
$ics_file = trim($ics_file);
But still haven't figured that out. Any help would be appreciated.