3

I am working with Server Side Includes in WAMP on Windows. My html files are executing with SSI file includes but it is displaying the blank white spaces in the output.

How can i remove the white spaces generated by

<!--include file="header.html" --> 

tag. this is generating white spaces which is crashing my page design.

Please help. Thanks

iml
  • 31
  • 2
  • I'm having the same problem too. It seems if I have a file index.html and use an ssi to include another .html file it leaves whitespace. If I have index.asp and use an ssi it's fine. I think it may be something to do with UTF8 encoding as I'm getting weird characters as well. – User123342234 May 29 '11 at 22:28

2 Answers2

3

So I ended up finding a solution that worked for me:

UTF8 makes an extra line on my site

Save all your files as UTF-8 without BOM (http://en.wikipedia.org/wiki/Byte_order_mark).

Community
  • 1
  • 1
User123342234
  • 1,455
  • 14
  • 17
0

Try removing all white spaces in your directives.

i.e.,

<!--#include virtual="xxx.shtml"--><header>title</header>
<p>lorem ipsum, bacon, and stuffs...</p>
<footer>copyright</footer><!--#include virtual="xxx.shtml"-->
Chris Ensell
  • 153
  • 2
  • 9
  • Even Though it is generating the same blank white spaces. please see below the code
    main content here
     
    – iml May 01 '11 at 04:21