@olliwalli, any errors you see being reported in the server log?
Old:
- Code: Select all
$header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n";
New:
- Code: Select all
$header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n";
And also replacing
- Code: Select all
$header .= $content."\r\n\r\n";
with
- Code: Select all
$header .= $content."";
Then it worked.