タイトルは自明です。
PHP にはかなりの経験がありますが、関数が と の間でどのようにheader
機能するかはわかりません。ob_start()
ob_end_clean()
このことを考慮:
ob_start();
echo "Some content";
header('X-Example-Header: foo');
echo "Some more content";
$output = ob_get_contents();
ob_end_clean();
echo $output;
Does the header
function ignore the output buffering, and thus all headers get sent before the content because it is echo
ed after the header
call?
Or does it work some other way?