PHP header Location works in the middle of HTML PHP header Location works in the middle of HTML apache apache

PHP header Location works in the middle of HTML


If you have output buffering autoenabled in php.ini then you can emit headers at any time before the output is actually sent.


If you have output buffering enabled (see ob_start()), no output is sent until the whole page is finished.