2
I’ve seen somewhere a code that configures PHP to go emptying the Buffer (print on screen) while running script without the need to wait all the execution for something to be displayed.
Has anyone seen or knows what that command is?
2
I’ve seen somewhere a code that configures PHP to go emptying the Buffer (print on screen) while running script without the need to wait all the execution for something to be displayed.
Has anyone seen or knows what that command is?
3
The method you seek is the ob_flush
.
It’s also possible, rather than letting the buffer from time to time, to output the buffer whenever a echo
with:
ob_implicit_flush(true);
Finally, you can set up directly on php.ini
:
implicit_flush = Off
Browser other questions tagged php buffer
You are not signed in. Login or sign up in order to post.
Exactly, I already knew and use constantly the
ob_flush
to put the contents of the buffer in variables, but I did not care that it also downloaded the buffer on the screen... : D Agora esse doob_implicit_flush
was awesome, didn’t know, very good.– KaduAmaral
You can configure the directive
implicit_flush
in thephp.ini
, and so do not need to set this always :)– Rodrigo Rigotti
Thanks for this information, it might be useful for people who need it (add the directive in the reply), but I need this functionality only for a specific function so it’s best to just call the function in the file.
– KaduAmaral
@Kaduamaral Feito. :)
– Rodrigo Rigotti