File resource - fopen('php://output')
Header list:
Content-Type: application/csv
Content-Disposition: attachment; filename="test.csv"
Cache-Control: max-age=0
Expires: 0
Cache-Control: must-revalidate
Pragma: public
How i download:
ob_clean();
readfile("php://output");
exit;
ob_get_contents() before readfile is not empty and data which i write to file too.
But loaded file is empty. Why