Creating file for download, howto clear html first? - Joomla! Forum - community, help and support
i've written component creates xls file download, xls file includes html page, can tell me how stop happening output specify in target file?
i've tried ob_flush()
i've tried ob_flush()
component code first output rendered, can exit after rendering xls output. anyway, can call ob_clean clear has been output.
code: select all
ob_end_clean();
/*
write header information.
*/
header("expires: sat, 30 dec 1990 07:07:07 gmt");
header("content-type: application/octet-stream ");
header("accept-ranges: bytes");
header('content-disposition: attachment; filename="x.xls"');
header("content-transfer-encoding: binary\n");
render_xls();
exit;
Comments
Post a Comment