A practice for displaying the status of the code being processed in slower or more processed reloads, such as batch processing, file loading, bulk mailing, etc.If you want to use php’s flush function, I suggest you take a look at the documentation, but summarizing what the flush does is display on the screen what has already been processed to the point where it is and continues processing.
http://php.net/manual/en/function.flush.php
Since you did not put the code, I will put in a generic way the process and Voce can adapt to your reality...
for($x=0; $x <= 10000; $x++){
echo 'bloco 1 - linha'. $x.'<br>';
}
flush();
// Aqui ele explode na tela o primeiro bloco antes de começar a processar o segundo...
for($y=0; $y <= 10000; $y++){
echo 'bloco 2 - linha'. $y.'<br>';
}
flush();
// Aqui ele explode na tela o segundo bloco antes de começar a processar o terceiro...
for($z=0; $z<= 10000; $z++){
echo 'bloco 2 - linha'. $z.'<br>';
}
//ao completar o processamento ele vai exibir o restante da página
Thanks for the help, but I would like to do this loading on the front end, where the user would see that the steps are being executed. I don’t think that function could help me.
– Huhifeku
the code processed is in php? if it has to be so... I will edit and Voce analyzes if it suits you
– Michel Simões