Analysis of PHP header output
"; Header ('Location: http://www.baidu.com ');/* but run the above found successful jump name, because this does not conform to the HTTP specification of the HTTP header, it is likely that the entire HTTP Response cannot be parsed. Fortunately, PHP seems to have fixed the problem of the HTTP header format for you. The problem of starting an HTTP header does not need to be output after the HTTP content is output. However, the server will cache the output. although you have used echo or print, the server did not output the content as an HTTP packet at that time. at that time, you still have the opportunity to modify the HTTP header. If you just want to raise an error, see example 2 * // Example 2 echo ""; ob_flush (); # Output Buffer content flush (); # refresh the buffer, the function does not affect the cache mode of the server or client browser. Therefore, you must use both the ob_flush () and flush () functions to refresh the output buffer // We'll be outputting a response header ('Location: http://www.baidu.com ');?>