GG.
GG.

Reputation: 21904

php's include done a space in my html layout

I have this:

<div id="results">
    <?php include 'server.php'; ?>
</div>

which done a space in my html layout.

include problem

Server.php looks like:

<?php
//php processing...

//first echo:
echo '<h1>Serveur : '.$hostname.'</h1>';

//others echo...
?>

Why this space ? A solution ?

Upvotes: 1

Views: 161

Answers (1)

Molochdaa
Molochdaa

Reputation: 2218

Verify that the file server.php isn't in UTF-8 with BOM, and try removing the closing tag, ie :

  <?php
  //php processing...

  //first echo:
  echo '<h1>Serveur : '.$hostname.'</h1>';

  //others echo...

Upvotes: 4

Related Questions