headers sent in php after output STILL working

人盡茶涼 提交于 2020-01-07 06:42:40

问题


I have this simple script:

this is output!

<?php

header("Location: http://www.google.com");

?>

You believe it or not it works and I get no warnings either!

The manual says no output should be done before sending headers or no headers will be actually sent. But it does work anyway and it is annoying me.


回答1:


This is possible because of output buffers.



来源:https://stackoverflow.com/questions/13180649/headers-sent-in-php-after-output-still-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!