0

Is it possible to send the output of a php script before the end of the script so we can make any unrelated operations to the output ?

faressoft
  • 19,053
  • 44
  • 104
  • 146

1 Answers1

0

yes you can :

on the top of the script define those :

ini_set("implicit_flush", 1);
while (@ob_end_flush());
ob_implicit_flush(true);

after any output (echo print or print_r) call thise two functions to flush it :

flush();
ob_flush();
ImadOS
  • 425
  • 3
  • 14