As a site developer I just stumbled into a thing I just want to share for those who perhaps have the same sort of behaviours.
In my test/develop environment I'm using:
Internet Explorer
Firefox
Netscape
Opera
And for developing php I'm using the ZEND studio
And allthough generating correct outputs when using the suggested code for implementing the custom headers in the FAQ and forum like
(allthough I'm not using static)
if(empty($custom_header)){
include('/path/your_file.php');
static $custom_header = ob_get_contents();
ob_clean();
}
I got two warnings from ZEND studio like:
Cannot modify header information - headers allready sent by (output started at bla bla bla bla .php:1106)
(This was at the test server at localhost so no headers from third parties or something involved)
The file and line it mentioned was not generating the fault but what solved the warnings was including:
ob_start();
just before the include statement.
Allthough I don't think a lot of people will use php debuggers and will probably never see such output I just want to share this little code.
I think that's the correct way of doing the output buffering. Thanks for the tip.