我的服务器的 PHP echo 函数有问题。
由于某种原因,每次我调用“echo”时,无论什么 echo 都会在其前面留下六七个额外的空格,从而导致如下所示:
echo "hello world" //ends up like:
hello world //instead of:
hello world
Run Code Online (Sandbox Code Playgroud)
对发生的事情有什么想法吗?
它发生在我的整个服务器上(奇怪的是,昨天它工作正常。我没有触及 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!";
Run Code Online (Sandbox Code Playgroud)