我的服务器的PHP echo函数有问题。
由于某些原因,每次我调用"echo“时,不管是什么echo,它的前面都有6到7个额外的空格,结果是这样的:
echo "hello world" //ends up like:
hello world //instead of:
hello world知道发生了什么事吗?
它发生在我的整个服务器上(奇怪的是,昨天它工作得很好。我没有接触php设置或其他任何东西)
下面只是一个显示此错误的脚本示例:
将URI发布到数据库
require_once("../../m/includes/globals.php");
$user = DB_Login($_POST["username"], $_POST["password"]);
$uri = mysql_escape_string($_POST["uri"]);
$userID = $user['userID'];
$result = DB_ExecuteQuery("UPDATE driver SET windowsPhoneID = '$uri' WHERE userID = '$userID'" );
if ($result === FALSE) {
echo "error occurred during updating";
}
echo "success!";发布于 2012-08-10 06:30:01
在m/includes/globals.php的末尾有没有一个结束的php标签?也许在结束标签后面有一些空格。
https://stackoverflow.com/questions/11892646
复制相似问题