参照“让登录变得更安全”(http://www.foxtable.com/mobilehelp/)代码较长,不全部贴出。其中16-26行:
Dim fl As String = "d:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Dim wb As New weui
....
代码运行正常,
问题1 .但登录页面不会出现图表。
但如果加入其它
Select Case e.Path
Case "addnew.htm"
Dim wb As New WeUI '定义一个基于weui框架的网页生成器
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","新增订单")
.AddSelect("cp","产品","PD01|PD02|PD03|PD04|PD05")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btnok","确定")
End With
e.WriteString(wb.Build) '生成网页
End Select
问题2.“Dim wb As New WeUI”会冲突;
问题3. 即使改为“Dim wb1 As New WeUI”后不会生成网页,默认登录页面。
求解,谢谢