Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8366999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:03:11+00:00 2026-06-09T13:03:11+00:00

I have some files that I need to include in several pages so, I

  • 0

I have some files that I need to include in several pages so, I use something like

<html>
<head>
<title>This is a webpage</title>
</head>
<body>
<div>Hello, this is a webpage</div>
<?php include("header.html");?>
<div>Some more text.</div>
<?php include("BlockToInclude.php");?>
<div>Even more text.</div>
<?php include("footer.html");?>
</body>
</html>

The problem is that with each include(); I get a blank space of 20px before the included content. I get around this this by reducing the margin of the first included block by 20px, but I would prefer something that avoid this space instead of compensate it. Also, I’m kind of new to PHP, is this a normal behaviour or should I look for something I’m doing wrong?

UPDATE: I checked in the resulting code and in every spot where I called an insert(); function it appears an stranger character that is not in the original file (nor the caller or the included). I copied the code from the Firefox code viewer (where is not visible) to my editor (RJ TextEd in Windows) where it appears as a question mark in a box; if I save this code as an static html it renders the same, but if I delete those characters then the blank space disappears. Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:03:13+00:00Added an answer on June 9, 2026 at 1:03 pm

    I found this topic here

    Someone sais:

    I’ve had this problem before. Make sure you upload your file in ASCII not Binary. Sometimes, with some FTP servers, you have to set this manually. Also try converting your newlines to “\n” in your text editor. Lemme know which editor you’re using and I’ll give you more specific instructions.

    http://forums.digitalpoint.com/showthread.php?t=957679

    And someone solved it :
    I solve this problem using notepad++ (http://notepad-plus.sourceforge.net/)
    Open php files with notepad++ and in Format menu chose encode in utf-8 without BOM and save it.

    Hope this helps to

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some files that need to use by my application when it is
I have some css files that i need to use in RTL direction template.
I have a few HTML files that I'd like to include via tags in
I have several JSP files that are included into other JSP pages. Some of
I have some files that need to be sorted by name, unfortunately I can't
I have some JPG files that need to be replaced at runtime with a
I have some data files that I need to install together with my application
I have some files that are uuencoded, and I need to decode them, using
I have some files that I would like to rename using regex and powershell,
I have several javascript files that during run-time get combined and minified. This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.