PHP脚本在蜂窝连接的输出末尾有额外的0 [英] PHP script has extra 0 at the end of the output on a cellular connection

查看:151
本文介绍了PHP脚本在蜂窝连接的输出末尾有额外的0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的PHP脚本,如下所示:

I have a very simple PHP script as follows:

<?php

    echo "$$";

?>

在wifi或有线连接上,输出正常,如下所示:

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

$$

但是在我的蜂窝连接(AT& T上的LTE)上,输出是:

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

$$0

输出零是怎么回事?

这个问题似乎只发生在AT& T网络上,我在Verizon网络上尝试过,并且一直在起作用.

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

推荐答案

添加以下代码即可解决问题:

Adding this line of code solved the problem:

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

这篇关于PHP脚本在蜂窝连接的输出末尾有额外的0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆