I have posted about—and have dealt with—character encoding issues on many occasions. And the behavior you describe of you knowing the @
is coming from the config.php
file by testing the echo 'test';
in require_once
is not an encoding issue.
If this were an encoding issue, it would be garbage text/characters that would be at the top of the page or bottom of the page but could not be moved from those locations in the way you describe.
Somewhere in your config.php
file there simply is an @
floating in there that is either:
- The
@
is outside the context of the PHP opening & closing tags (<?php
/?>
).
- Something in your code is deliberately
echo
ing a @
.
- Or—and this will be tricky—but depending on the complexity of your
config.php
file, it could be coming from another file that is being loaded via require_once
or include
within that config.php
file.
The simplest thing to do right now is just open up the config.php
file & do a search for the @
character. Look at each instance of that showing up & the context of the line it’s in. If you are lucky, you will spot something that seems odd.
Past that the best debugging tactic right now is to do the same echo 'test';
you did elsewhere solely in the config.php
file itself.
- First place that at the top of the
config.php
file & load the page.
- Then place it at the bottom of the
config.php
file & load the page.
- Then you might have to go from line-to-line to see if you can pin point it.
- If you have to go from line-to-line, then split the difference. Go to the middle of the
config.php
and place the echo 'test';
there. Then based on what you see, keep on placing that either above or below the middle of the page.
Yes, this can be tedious. But it’s the best way to handle a case like this.