Response.clear
does anyone know its equivalent in php ? :(
Printable View
Response.clear
does anyone know its equivalent in php ? :(
What does response.clear do?
It clears the buffered HTML output after the previous flush.
Yes there is an equivilent in PHP. However, you have to turn on output buffering. You can find information about it here.
Basically, you should use the ob_start() function to start the buffer and call ob_flush() whenever you want to flush the buffer. By default however, PHP handles all output control.
Same thing in ASP, you need to enable it first. Of course I didn't know its PHP equivalent nor do I think I'll ever use it. :afrog:
I use output buffering only when I have something (an include file or a function) that writes to the console, but I really want it in a variable.
Code:ob_start();
include('thefile.php');
$data = ob_get_contents();
ob_end_clean();
yup. already turned that on.. for header() to work.
uhm.
about flush() function.. what's its difference with ob_flush()?