I have export in excel & csv format, export is working in IE but its not working in chrome…can any one help me.
am using below code
public function actionDownloadData()
{
// Send file
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . Yii::app()->user->getState('downloadFile'));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize(Yii::app()->user->getState('downloadData')));
ob_clean();
flush();
readfile(Yii::app()->user->getState('downloadData'));
// Delete data
unlink(Yii::app()->user->getState('downloadData'));
Yii::app()->user->setState('downloadFile', null);
Yii::app()->user->setState('downloadData', null);
}