Reputation: 625
I'm having an issue with my server's PHP echo function.
For some reason, everytime I call "echo", whatever echoes ends up with six or seven extra spaces in front of it, resulting in something like this:
echo "hello world" //ends up like:
hello world //instead of:
hello world
any ideas on what's happening?
it's happening across my ENTIRE server (weirdly, yesterday it worked fine. I didn't touch the php settings or anything)
here's just an example of a script that shows this error:
posts URI to database
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!";
Upvotes: 3
Views: 2722
Reputation: 22875
Do you have a closing php tag at the end of m/includes/globals.php? Maybe there is some whitespace after the closing tag.
Upvotes: 5