自定义函数--HttpRequest
'服务器连接的第一函数
Dim e As RequestEventArgs = args(0)
Dim url As String = e.Path
If url > "" Then
If url.Contains(".") Then
If Functions.Contains(url.Split(".")(0)) Then
Functions.Execute(url.Split(".")(0), e)
Else
Functions.Execute("cw", e) '没有指向页面
End If
Else
If Functions.Contains(url) Then
Functions.Execute(url, e)
Else
Functions.Execute("cw", e) '没有指向页面
End If
End If
Else
Functions.Execute("index", e) '首页
End If
自定义函数--xmgl
Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.Title = "项目管理汇总"
If e.PostValues.ContainsKey("pw") Then
Dim pw As String = e.PostValues("pw")
If pw = Functions.Execute("Get", "设置", 6) Then
Dim Book As New XLS.Book(ProjectPath & "Attachments\项目管理.xls")
e.WriteBookAsHTML(Book)
Else
wb.AddForm("", "form1", "xmgl.htm")
With wb.AddMsgPage("", "msgpage", "密码错误", "密码输入错误,请重新输入。")
.Icon = "warn"
.AddButton("btn1", "重新输入", "xmgl.htm")
End With
e.WriteString(wb.Build) '生成网页
End If
Else
wb.AddForm("", "form1", "xmgl.htm")
With wb.AddInputGroup("form1", "ipg1", "请输入项目管理密码")
.AddInput("pw", "密码", "password")
End With
With wb.AddButtonGroup("form1", "btg1", True)
.Add("btn1", "查看项目管理汇总", "submit")
End With
e.WriteString(wb.Build) '生成网页
End If
测试没有问题,发布以后一直提示页面【4caa846a1c.files\sheet001.htm】不存在或者您没有该页面的访问权限,要如何处理?