PHP script has extra 0 at the end of the output on

2019-07-18 10:12发布

问题:

I have a very simple PHP script as follows:

<?php

    echo "$$";

?>

On wifi or wired connections, the output is normal, as follows:

$$

But on my cellular connection (which is LTE on AT&T), the output is:

$$0

What's up with the zero in the output?

The issue only seems to happen on AT&T network, I tried on Verizon network and it was working.

回答1:

Adding this line of code solved the problem:

header('Content-Type: text/plain; charset=utf-8');