波斯马BOSSMA Information Technology

IIS支持shtml配置及测试

发布时间:2007年3月8日 / 分类:SERVER / 8,992 次浏览 / 评论

1、什么是shtml?
CSDN上有一篇文章讲得很好:shtml精简教程
2、IIS如何支持shtml?
以我的系统为例:windows server 2003+iis6
(1)开始–管理工具–Internet信息服务管理器–WEB服务扩展–选择“在服务器端的包含文件”–设置为“允许”;
(2)Internet信息服务管理器–在你的网站上点击右键–属性–主目录–配置–应用程序扩展–在其中应该可以找到.shtml和.shtm,如果没有需要自己添加:
可执行文件:C:\WINDOWS\system32\inetsrv\ssinc.dll
扩展名:.shtml或.shtm
限制为:GET,POST
勾选“脚本引擎”和“确认文件是否存在”;
(3)Internet信息服务管理器–文档–添加“index.shtml”和“index.shtm”;
3、如何测试shtml?
编写测试文件:
(1)被包含的文件:
?top.html

<table width="778" border="0" align="center" cellpadding="0" cellspacing="1">
? <tr>
??? <td height="50" colspan="3" bgcolor="#006699"><div align="center">SHTML测试</div></td>
? </tr>
</table>

?bottom.html

<table width="778" border="0" align="center" cellpadding="0" cellspacing="1">
? <tr>
??? <td height="30" colspan="3" bgcolor="#006699"><div align="center">恭喜您,您的服务器支持shtml! </div></td>
? </tr>
</table>

(2)主文件:
?index.shtml

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>shtml测试</title>
<style type="text/css">
<!--
.STYLE1 {
?font-size: 36px;
?font-weight: bold;
?color: #FFFFFF;
}
.STYLE2 {color: #FFFFFF; font-size: 12px;}
-->
</style>
</head>
<body>
<!--#include file="top.html"-->
<table width="776" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#006699">
? <tr>
??? <td height="200" colspan="3" bgcolor="#FFFFFF"><div align="center">看看您的服务器支持shtml吗?</div></td>
? </tr>
</table>
<!--#include file="bottom.html"-->
</body>
</html>

在浏览器中输入您的文件服务器路径,如果在下面能看到“恭喜您,您的服务器支持shtml!” ,其他的就不用我说了吧!

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自波斯马,原文地址《IIS支持shtml配置及测试

关键字:

建议订阅本站,及时阅读最新文章!
【上一篇】 【下一篇】

发表评论