繁体   English   中英

如何从 SSI 包含文件中删除空格?

[英]How to Remove white spaces from SSI include file?

我正在使用 Windows 上的 WAMP 中的服务器端包含。 我的 html 文件正在执行包含 SSI 文件的文件,但它在 output 中显示空白空格。

如何删除由

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

标签。 这会产生空白,这会破坏我的页面设计。

请帮忙。 谢谢

所以我最终找到了一个适合我的解决方案:

UTF8 在我的网站上增加了一行

将所有文件另存为 UTF-8 没有 BOM ( http://en.wikipedia.org/wiki/Byte_order_mark )。

尝试删除指令中的所有空格。

IE,

<!--#include virtual="xxx.shtml"--><header>title</header>
<p>lorem ipsum, bacon, and stuffs...</p>
<footer>copyright</footer><!--#include virtual="xxx.shtml"-->

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM