server side include (SSI) inserts junk into page

server side include (SSI) inserts junk into page

Posted by: quillaja
Posted on: 2009-02-04 01:40:00

I have a small technical problem that i hope someone can give me some advice for.

I'm trying to make the header and menu for my website be easy to update across many pages. So, i'm using Server Side Includes. However, the include is inserting junk text into the page at the beginning of the included material.

For example, i have a DIV enclosing the header, and the contents in a separate header.html file, like so:

<div id="header">
< !--#include virtual="/include/header.html"-->
</div>
[space added before ! to make the line display]

The include inserts the contents as expected, but adds "".

I've tried both html and php includes, and they both do the same thing.

And example page is here:
http://www.quillaja.net/masterpage2.shtml

Does anyone have an idea on why this occurs or how i can fix it?

I'm using Visual Studio 2008 (though i hand-code everything).

Re: server side include (SSI) inserts junk into page

Posted by: sXi
Posted on: 2009-02-04 01:57:00

That's the Byte Order Mark for UTF-8.

Copy/paste your code into Notepad and resave.




How To Install PHP.INI / ionCube on DreamHost

Re: server side include (SSI) inserts junk into page

Posted by: quillaja
Posted on: 2009-02-04 04:38:00

Thanks, it worked. =)

Tags: server sidessidiv