In MySQL I have set my data field type to utf8_bin
and i am storing data in Unicode. Texts are being properly displayed in web pages.
I want to generate ex
Try following code;
ob_end_clean();
$_filename = date('Y_m_d_H_i').".csv";
header("Cache-Control: public");
header("Content-Type: application/octet-stream");
header("Content-Type: text/csv; charset=utf-8");
header("Content-Disposition: attachment; filename=$_filename");
// Read the file from disk
readfile($filename);
exit();