CakePHP – Export data to a .html file
CakePHP – Export data to a .html file
header(‘Content-Type: text/html; charset=utf-8’);
header(‘Content-Type: application/force-download’);
header(‘Content-Type: application/octet-stream’);
header(‘Content-Type: application/download’);
header( ‘Content-disposition: attachment; filename=”<your file name here>.html”‘);
Hope it will work, Have a nice day!.