1$file = "test.csv";
2 header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
3 header('Content-Disposition: attachment; filename='.$file);
4 $content = "Col1,Col2,Col3\n";
5 $content .= "test1,test1,test3\n";
6 $content .= "testtest,ttesttest2,testtest3\n";
7 echo $content;
8