簡體   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