Sunday 26 March 2017

PHP Header issue with ob_start() and ob_end_flush()

There's a lot of invisible output in your code:


 --- THERE IS A LINE RETURN HERE ---
--- SPACES OR TABS --- --- LINE RETURN ---
--- AND HERE --- ...

Quit starting and ending your php tags. Just do this:


    ob_start();
include_once("header.php");
global $db;
...

Make absolutely sure that there is no output, and no whitespace outside of your tags before the call to ob_start(). If your error is on line 9, you've got a bunch of lines before that call that could be the problem. You may want to post all of those lines, numbered, so we can look at them carefully.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...