I have a class that generates a file .xls
to 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 sites that I used to convert files in which after finishing the upload I could close the page, the browser and even shut down 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 searches I ended up finding pcntl_fork()
, which seemed to be perfect, until I found out that it only works if I run .php
directly from the terminal. I have not found anything that works on websites.