Hi there,
I'm delivering files through a web link via download. You've probably seen this code before and it works great:
//get the file string up here first
header ("Accept-Ranges: bytes");
header ("Connection: close");
header ("Content-type: $fileType");
header ("Content-Length: ". $fileSize);
header ("Content-Disposition: attachment; filename=\"$FileName\"");
echo $fileData;
the PROBLEM is that I need to run this page in session, and it appears that calling session_start() places a header first that conflicts with the headers above. The file doesn't download properly.
Any suggestions?
Sam