filename = $this->check_extension($filename); } else { $this->filename = 'XLS_download_' . date('dmY') . '.xls'; } } function display($filename, $output) { header('Content-type: application/vnd.ms-excel; charset=windows-1250'); header('Content-Disposition: attachment; filename="'.$filename.'"'); echo $output; exit; } } ?>