Nick Wilson wrote:

Say i have a php script like this:

<?php
  print(html_head());
  // do loads of time taking stuff
  print(html_footer());
?>

How come I dont see the html header (it's just a function that returns a
string with the html up till <body>) before the entire script has run?

This goes against my understanding, why might this be and what might i
use to get some output before the script has finished executing?

Could be your web server buffering the output until the script finishes or something else on your connection doing the same. Some web browsers will not show content until everything is received. You could try using flush() to see if that helps.


--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to