以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  e.writestring  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=152381)

--  作者:1498351234
--  发布时间:2020/7/10 22:03:00
--  e.writestring
        If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
            htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
            e.WriteString(htm1)
        End If

老师:当htm1文本内容达到60kb以上时,手机第一次能打开页面,第二次以后就不行了,不知怎么回事?
[此贴子已经被作者于2020/7/10 22:07:02编辑过]

--  作者:有点蓝
--  发布时间:2020/7/11 8:57:00
--  
贴出这个代码所在的完整代码。贴出httprequest的完整代码
--  作者:1498351234
--  发布时间:2020/7/11 13:45:00
--  

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:新建文本文档.txt

 

 

    Case "shiguanli.htm"
        Dim   htm1 As String
        If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
            htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
            e.WriteString(htm1)
        End If

 

 

 

老师:企业微信在电脑上登录打开成功的概率高一些,在手机上测试成功的概率低很多。很不稳定。


 

[此贴子已经被作者于2020/7/11 14:07:39编辑过]

--  作者:1498351234
--  发布时间:2020/7/11 13:51:00
--  
 Case "shiguanli.htm"
        Dim   htm1 As String
        If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
            htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
            e.WriteString(htm1)
        End If
--  作者:有点蓝
--  发布时间:2020/7/11 14:26:00
--  
我测试没有问题!贴出这个代码所在的完整代码。贴出httprequest的完整代码。
--  作者:1498351234
--  发布时间:2020/7/11 15:49:00
--  

通过九宫格链接过去的:

Dim Val2 As Integer = Rand.Next(10000)

With wb.AddGrid("page2_1", "g2")
.Add("c8","事故案例","./she.png","http://sxwytx.iego.cn/shiguanli.htm?v=" & Val2 )
End With

 

 

这是httprequest的代码:

 

Dim fl As String = "d:\\web\\" & e.path
Dim path As String = fl.replace("d:\\web\\","")
If FileSys.FileExists(path) Then
    e.WriteFile(path)
End If

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",".txt"
            e.WriteFile(fl)
            Return \'这里必须返回
    End Select
End If
Dim wb As New WeUI
Dim cmd As new SQLCommand
Dim DeviceId As String
Dim Verified  As Boolean
Dim UserId As String
Dim sb As New StringBuilder

If UserId  > ""  Then
    Verified  = True
    e.AppendCookie("userid",UserId) \'将userid和username存储在Cookie中
ElseIf e.GetValues.ContainsKey("code") = False Then \'如果授权失败,且不是通过授权链接跳转而来,那么就跳转到授权链接
    Dim ul As String
    If  e.GetValues("qt") = 2  Then   \'判断取题是考试题还是练习题,有qt为考试题
        ul = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww51c9a9c0c93a7d18&redirect_uri=http%3a%2f%2f" & _
        "sxwytx.iego.cn%2ftest%2fmain.htm%3fqt%3d2&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
    ElseIf  e.GetValues("qt") = 1   \'取练习题
        ul  = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww51c9a9c0c93a7d18&redirect_uri=http%3a%2f%2f" & _
        "sxwytx.iego.cn%2ftest%2fmain.htm&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
    ElseIf e.GetValues.ContainsKey("qt") = False Then
        Dim ul1 As String = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_base&state={2}#wechat_redirect"
        Dim ul2 As String = UrlEncode("http://sxwytx.iego.cn/" & e.path)
        ul = CExp(ul1,"ww51c9a9c0c93a7d18",ul2,"123")
    End If
    sb.Append("<meta http-equiv=\'Refresh\' c>") \'跳转到授权链接
    e.WriteString(sb.ToString)
    Return
End If


Select Case e.Path
    Case "shiguanli.htm"
        Dim   htm1 As String
        If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
            htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
            e.WriteString(htm1)
        End If
End Select

 

 

 

 

 

 

[此贴子已经被作者于2020/7/11 15:49:20编辑过]

--  作者:有点蓝
--  发布时间:2020/7/11 16:07:00
--  
请上传实例说明问题
--  作者:1498351234
--  发布时间:2020/7/11 16:18:00
--  

Select Case e.Path
    Case "shiguanli.htm"
        Dim   htm1 As String
        If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
            htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
            e.WriteString(htm1)

            return
        End If
End Select

 

 

老师:我在这里加了return后好了,可能是没有加return别的地方干扰的吧。


--  作者:有点蓝
--  发布时间:2020/7/11 16:29:00
--  
所以让您发完整代码。不然没法查看问题