I am trying to make a file download view of my component.
I have this
Before that (in the same file) I have a script that creates the file and I know the file is created.
Code: Select all
header("Content-Type: application/vnd.ms-word"); header("Content-Length: ".filesize($filename.'.docx')); header('Content-Disposition: attachment; filename='.basename($filename).'.docx'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); ob_clean(); flush(); readfile('tmp/'.$filename.'.docx'); unlink('tmp/'.$filename.'.docx'); exit();
The code above works in Fire Fox (14.0.1) but does not work in Internet Explorer 8 or 9...
Thanx in advance!