In uno script che dura alcuni secondi, ho la necessità di scrivere sullo schermo alcuni dati.
Il comando flush() non va bene perchè "has no effect on the buffering scheme of your webserver or the browser on the client side" (dal manuale PHP).
C'è un modo per scrivere l'output anche se lo script resta in esecuzione?