如果你想讓你的IIS支持wml,做個(gè)wap網(wǎng)站,只需作小小的改變就行了.雖然目前支持wml的虛擬主機(jī)極少,但是自己在本機(jī)上玩玩也好的.
首先在打開IIS,然后在默認(rèn)網(wǎng)站的屬性--HTTP頭--MMIE映射--文件類型--添加注冊(cè)文件的類型:
Associated Extension MIME Type
wml text/vnd.wap.wml
wmlc application/vnd.wap.wmlc
wbmp image/vnd.wap.wbmp
wmlsc application/vnd.wap.wmlscriptc
wmls text/vnd.wap.wmlscript
wsc application/vnd.wap/wmlscriptc
<img title="dvubb" src="skins/default/fgdown.gif" border="0" /><a href="#" onC oncontextmenu="Flashget_SetHref(this)">[快車下載]</a>:
<a href="UploadFile/2006-3/20063161235715359.jpg" target="_blank" ><img title="dvubb" src="UploadFile/2006-3/20063161235715359.jpg" border="0" alt="按此在新窗口瀏覽圖片" /></a>
現(xiàn)在你就可以在你的站點(diǎn)添加wml文件了.可以用手機(jī)模擬器來(lái)瀏覽,或者opera瀏覽器瀏覽.如果你的主機(jī)是對(duì)外發(fā)布的,那你就可以用手機(jī)來(lái)瀏覽你的網(wǎng)站了.
如果是用ASP生成wml,必須包含這句:<% Response.ContentType="text/vnd.wap.wml" %>
例如這個(gè)例子:test.asp
<%@ Language=VBScript %>
<% Response.ContentType="text/vnd.wap.wml" %>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "<a target="_blank" >' target=_blank>http://www.wapforum.org/DTD/wml_1.1.xml"></A>
<wml>
<card id="main">
<p>
Just A test on my wap site!
</p>
</card>
</wml>