1
I have a class that generates a file .xls
for download. The problem is that it has more than 30,000 entries, so it takes about 10 minutes to generate. And in that time I have to keep the page open loading.
I remember some sites that I used to convert files in which after finishing the upload I could close the page, the browser and even turn off the computer that when the process was finished I would receive an email with my file attached.
My intention is to do the same with this file. The user clicks to download, then is redirected to a page that says he will receive the file in the email and meanwhile he can close the page and do something else.
In my researches I ended up finding the pcntl_fork()
, that seemed to be perfect, until I discovered that it only works if I rotate the .php
directly from the terminal. I couldn’t find anything that works on websites.