Html SHTML 的目的和独特性是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/519619/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the purpose and uniqueness SHTML?
提问by balaweblog
Recently I came to know about SHTML when I saw a site with .shtml extensions.
最近,当我看到一个带有 .shtml 扩展名的网站时,我开始了解 SHTML。
What is the purpose of SHTML, and in what ways does it differ from HTML and DHTML?
SHTML 的用途是什么,它与 HTML 和 DHTML 有何不同?
回答by Rob Grant
SHTML is a file extension that lets the web server know the file should be processed as using Server Side Includes (SSI).
SHTML 是一种文件扩展名,它让 Web 服务器知道应该使用服务器端包含 (SSI) 来处理文件。
(HTML is...you know what it is, and DHTML is Microsoft's name for Javascript+HTML+CSS or something).
(HTML 是……你知道它是什么,而 DHTML 是微软对 Javascript+HTML+CSS 或其他东西的名称)。
You can use SSI to include a common header and footer in your pages, so you don't have to repeat code as much. Changing one included file updates all of your pages at once. You just put it in your HTML page as per normal.
您可以使用 SSI 在页面中包含一个通用的页眉和页脚,这样您就不必过多地重复代码。更改一个包含的文件会立即更新所有页面。您只需按照正常方式将其放入 HTML 页面即可。
It's embedded in a standard XML comment, and looks like this:
它嵌入在标准 XML 注释中,如下所示:
<!--#include virtual="top.shtml" -->
It's been largely superseded by other mechanisms, such as PHP includes, but some hosting packages still support it and nothing else.
它在很大程度上已被其他机制取代,例如 PHP 包含,但一些托管包仍然支持它,仅此而已。
You can read more in this Wikipedia article.
您可以在这篇维基百科文章中阅读更多内容。
回答by Gumbo
It's just HTML with Server Side Includes.
它只是带有Server Side Includes 的HTML 。