The problem is that analytics stats aren’t registering hits on this page, which makes me think that the contents of the include aren’t being output to the client’s browser before the header redirect kicks in.
Have I misunderstood the function of ob_start()? Can anyone help?
the contents of the include aren’t being output to the client’s browser before the header redirect kicks in.
You cannot send any output to the Browser before the line
header(“Location: http://www.website.com”);
If you try, you will get an error.
If you are not getting an error, presumably ‘…/global/includes/sitestat.php’
only does some internal action without sending output to browser.
And as observed by Mittineague, you have to end with ob_end_flush() to Send the output to the browser.