我如何在PHP中回显而没有回车符? [英] How do I echo in PHP without carriage returns?

查看:82
本文介绍了我如何在PHP中回显而没有回车符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在PHP中执行回显时,都会得到两个额外的回车符。例如:

Whenever I do an echo in PHP, I get two extra carriage returns. For example:

<?php
  echo 'abc';
?>

收益abc [cr] [cr]。如果我将脚本复制到其他服务器,甚至会得到[cr] abc [cr] [cr]。

yields abc[cr][cr]. If I copy my script to a different server, I even get [cr]abc[cr][cr].

如何强制PHP仅回显我的字符串' abc'而不是回车?

How do I force PHP to echo only my string 'abc' and not the carriage returns?

推荐答案

我必须得出结论,服务器设置会导致PHP在所有输出之前和之后跟随任意数量的回车。当然,这是我正在使用的虚拟主机的配置文件中的错误。

I have to conclude that a server setting causes PHP to precede and follow all output with an arbitrary number of carriage returns. Of course, this is an error in the config files of the web host I'm working with. It shouldn't be like this.

这篇关于我如何在PHP中回显而没有回车符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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