I have created my csv file and downloaded it.
$strtoexport = ‘lots,of,lovely,comma,delimited,stuff’;
header("Cache-Control: must-revalidate, post=check=0, pre-check=0");
header("Content-Length: " . strlen($strtoexport));
header("Content-type: textx-csv");
header("Content-Disposition: attachment; filename=myfile.csv");
echo $strtoexport;
Now I need to continue the script but it has stopped because the file has been sent. How can I get it to continue?
I was thinking of placing the download in an external file to work separately but I'm a bit stuck on how I an do that as pcntl_fork() is not available to me.
What I need is for the file to download and the page to continue. It needs to do that as the content is based on the information that has been altered by the download. eg 100 widgets have been downloaded (now 101).
Any ideas please.
Thanks