The file you put in there is automatically loaded and executed by PHP before any of the normal plugins are loaded.
The issue you’re seeing is because you have a “malformed” PHP file, in that you end with a closing PHP tag ?>
. If there is anything else after this closing tag, even only a line-break, this causes PHP to immediately send its headers and start echoing output.
If you file immediately starts with the opening PHP tag <?php
and does not include a closing tag ?>
, you should not see this issue.
The same problem was when you had an empty file. This was interpreted by PHP as a normal HTML file (PHP is a preprocessor for HTML) and simply echoed.