One Way am creating an xls with fopen("test.xls") .
Fwrite i xls yazmak ve readfile bana dosyasını verin.
Second Way
Ben koyarak xls üreten
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header ("Pragma: no-cache");
header("Expires: 0");
header('Content-Transfer-Encoding: none');
header("Content-Disposition: attachment; filename=\"test.xls\"");
header("Content-Type: application/vnd.ms-excel");
foreach ()
{
echo contents to the file
}
Dosyayı üreten bu 2 yolları arasında herhangi bir fark var mı.
Fark nedir.