The previous answer, of course, is complete nonsense - because, firstly, it narrows down all the causes of this error to the only one known to the author, and secondly, it does not fit into the description of the problem that arose when transferring the same files to another hosting.
Therefore, the correct solution is to rewrite spaghetti govnokod when some text is sent to the browser first, then the HTTP header, and then it turns out that you don’t need to display anything and redirect it.
In particular, in this particular case, you need to make sure that the top.php
file is not connected every time you access the site, but only when you need to display a page in the site design.
However, I have not yet met a single poacher, who would have followed the above advice. All of them are so incredible works worth scribbling the functionality of the "place an order" button, that the very idea of rewriting the code and making it better, terrifies them.
Therefore, the only acceptable solution for them is they see only the adjustment of the settings of the new hosting service in accordance with the settings of the old one - so that the new one also forgives the curvature of the code. This is done either in the PHP settings, by setting the output_buffering = on
setting, or simply by cramming the magic word ob_start()
at the very top of the problem script. Although when I see this second option, then bloody tears flow from my eyes. Since the use of the tool for other purposes was described by the still great Mark Twain, but over unlucky Tom Kent, who was killing nuts with the royal seal, the whole enlightened Europe had been laughing for a hundred years.