It so happened that I need to output in the middle of the page the result of the function depending on the value of a variable that takes its value from $ _GET, the function does different things.
For example:
PHP код, ла ла ла switch ($get) { case 1: function GET() { ла ла ла } break; case 2: function GET() { ту ту ту } break; ... и т.д. }
And it all comes out like this:
<html> <body> <? GET(); ?> </body> </html>
Moreover, in the function there is sometimes a sending of headers (header), and as you know, sending headers after there has already been output to the browser is not recommended. Well, the question is - how do you do this right? When PHP is installed as an Apache module - headers are sent with joy, and when, like CGI, output buffering saves.
PS By the way, does anyone know what to fear when using the ob_start()
function? Can it create any serious load? Or other problems? Buffer overflow?