减小字体
增大字体
第一个ASP页面。 NotePad输入下面的程序。 <%@Language=VBScript%> <%Response.ContentType="text/vnd.wap.wml"%><?xmlversion="1.0"?> <!DOCTYPEwmlPUBLIC"-//WAPFORUM//DTDWML1.1//EN""http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <cardid="main"> <p> Hello </p> </card> </wml>
保存为hello.asp。并且是它和hello.wml在同一个子目录下。 启动你的IIS服务器管理。在“默认的Web站点”下找到“wap”目录,用鼠标右键点击它,选择属性“Properties”,就会弹出一 个对话框,里面有好多配置选项。在“虚拟目录”标签页当中有一项应用程序设置。将“许可”一项设置为:“执行(包括脚 本)”。确定后,退出IISConsole。 打开WinWap,马上Stop它,在URL栏里输入:“http://127.0.0.1/wap/hello.asp”,并按下回车。等着欣赏你的第一个ASP页 面。
动态生成WBMP WBMP的具体解释请参看该部分的ISAPI的例子。
<%@Language=VBScript%> <% FunctionStoB(varstr) str2bin="" Fori=1ToLen(varstr) varchar=Mid(varstr,i,1) str2bin=str2bin&ChrB(AscB(varchar)) Next StoB=str2bin EndFunction img=chr(0)&chr(0)&chr(5)&chr(2)&chr(0)&chr(&Hf8)
Response.ContentType="image/vnd.wap.wbmp" Response.BinaryWritestob(img) %>
|