以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助] (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=118243) |
-- 作者:hzyt -- 发布时间:2018/4/27 14:48:00 -- [求助] 求助:(1)以下代码在内部函数里这么写对吗? (2)在HttpRequest事件代码怎么写? Dim e As RequestEventArgs = args(0) 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 Dim sb As New StringBuilder sb.Appendline("产品展示<br/><br/>") Select Case e.path Case "a.htm" sb.AppendLine("<img src=\'/images/004.jpg\'>") Case "b\\a.htm" sb.AppendLine("<img src=\'/images/013.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/010.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/011.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/012.jpg\'><br/><br/>") Case "a\\a.htm" sb.AppendLine("<img src=\'/images/008.mp4\'>") End Select e.WriteString(sb.ToString()) End If |
-- 作者:有点甜 -- 发布时间:2018/4/27 14:56:00 -- httprequest事件
Functions.Execute("函数名",e)
http://www.foxtable.com/mobilehelp/scr/0025.htm
|
-- 作者:hzyt -- 发布时间:2018/4/27 16:49:00 -- 老师您好!以下是我在HttpRequest事件的代码,还是显示不出来呢 Select Case e.Path Case "ybtpa.htm" Functions.Execute("ybtpa",e) End Select
|
-- 作者:有点甜 -- 发布时间:2018/4/27 16:51:00 -- 1、你函数【ybtpa】怎么写?
2、msgbox(e.path) 弹出什么? |
-- 作者:hzyt -- 发布时间:2018/4/27 17:00:00 -- Dim e As RequestEventArgs = args(0) 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 Dim sb As New StringBuilder sb.Appendline("产品展示<br/><br/>") Select Case e.path Case "a.htm" sb.AppendLine("<img src=\'/images/004.jpg\'>") Case "b\\a.htm" sb.AppendLine("<img src=\'/images/013.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/010.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/011.jpg\'><br/><br/>") sb.AppendLine("<img src=\'/images/012.jpg\'><br/><br/>") Case "a\\a.htm" sb.AppendLine("<img src=\'/images/008.mp4\'>") End Select e.WriteString(sb.ToString()) End If
|
-- 作者:有点甜 -- 发布时间:2018/4/27 17:01:00 -- httprequest事件
msgbox(e.path) Functions.Execute("ybtpa",e) |
-- 作者:hzyt -- 发布时间:2018/4/27 17:27:00 -- 老师,我是初学的 麻烦您了,我已按照您的要求写了: msgbox(e.path)
Functions.Execute("ybtpa",e) 我手机打开网页时,电脑端显示 b\\a.htm 要求点“确定” 不过我点确定后还是没用 |
-- 作者:有点甜 -- 发布时间:2018/4/27 18:10:00 -- 代码改成这样
Dim e As RequestEventArgs = args(0) Dim sb As New StringBuilder |
-- 作者:hzyt -- 发布时间:2018/4/27 19:27:00 -- OK了,谢谢! |