在看腾讯的网站时候,无意看到大量shtml后缀的页面,这些是什么呢?吓得我出了一声冷汗,岁数这么大了,竟然不知道这个。马上google,呵呵,很快我的第一个shtml也出来了。
建立个文件index.shtml,代码如下:
<html> <head> <title>first shtml</title> </head> <body> <!--#include file="error.htm"--> </body> </html>
error.htm 代码如下
<!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=utf-8" /> <title>无标题文档</title><mce:style type="text/css"><!-- body { margin-top: 0px; } --></mce:style><style type="text/css" mce_bogus="1">body { margin-top: 0px; }</style></head> <body> <table width="455" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td height="455"><img src="images/sorry.JPG" mce_src="images/sorry.JPG" width="455" height="455" /></td> </tr> </table> </body> </html>
发布页面部署站点,一切看似ok,马上在浏览器中输入htt://localhost/index.shtml ,呀呀,竟然报告找不到文件呢,这么会事。iis没设置呗。动手设置下:
1、inetmgr 打开iis管理器
2、点击web服务扩展,选择在服务器端的包含文件,点击允许。
3、右击所部署的网站,选择属性->主目录->配置->映射。点击添加,弹出窗口中输入
可执行文件:C:/WINDOWS/system32/inetsrv/ssinc.dll
扩展名:shtml/shtm
确定保存之后,在浏览器中重新浏览,页面出现了,查看源码如下:
<html> <body> <!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=utf-8" /> <title>无标题文档</title><mce:style type="text/css"><!-- body { margin-top: 0px; } --></mce:style><style type="text/css" mce_bogus="1">body { margin-top: 0px; }</style></head> <body> <table width="455" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td height="455"><img src="images/sorry.JPG" mce_src="images/sorry.JPG" width="455" height="455" /></td> </tr> </table> </body> </html> </body> </html>
呵呵!!!!!
<!--#include file="http://www.baidu.com"-->