Answer the question
In order to leave comments, you need to log in
How to execute PHP script in parts?
There is a PHP script that parses an XML file, but there are a huge number of elements in XML and very often the script crashes by timeout. Of course, you can increase the maximum script execution time in php.ini, but maybe there is an option to somehow restart the script, say after processing every 30 elements?
Thanks in advance to all who respond.
Answer the question
In order to leave comments, you need to log in
As an option. Ajax on the client with a progress bar that breaks the process into parts. We completed the part - they returned the work, again the request, etc. You can also pull data. If this is an admin part, for example, then it’s quite a solution. If this is for the user, then there will be nuances.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question