老师好:取不到键值
这是服务端代码:
Dim fl As String = "E:\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",".txt"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Select Case e.Path
Case "bbbb\aaaa.htm"
Dim sb As New StringBuilder
sb.AppendLine("通过GET方式提交的数据:<br/><br/>")
For Each key As String In e.GetValues.Keys
msgbox(e.values(key))
sb.AppendLine(key & ":" & e.GetValues(key) & "<br/>")
Next
e.WriteString(sb.ToString)
End Select
但通过浏览器能够得到键值
这个是客户端代码,由微信返回的userID 确实返回来了,并且写到文件里了,就是发不到服务器里
Case "view" '单击跳转到网页事件
Filesys.WriteAllText(logFile , UserID & "于" & CreateTime & "访问网页:" & Key & vbcrlf, True)
'试验部分
Dim uuu As String
If key.Contains("?") And key.Contains("=") Then
uuu =key & "&usid={0}"
Else
uuu =key & "?usid={0}"
End If
uuu = CExp(uuu, UserID )
Filesys.WriteAllText(logFile , UserID & "于" & CreateTime & "修改后网页:" & uuu & vbcrlf, True)
If uuu.Contains("aaaa.htm") Then
Dim hc As new HttpClient(uuu)
hc.Timeout = 5
hc.Content = UserID
End If
这是写到文本文件里的uuuu
18635700170于2018-11-16 16:11:26修改后网页:http://jintonggongsi.cn:32188/bbbb/aaaa.htm?qt=2&usid=18635700170
写在命令窗口里也服务器也得不到键值
Dim hc As new HttpClient("http://jintonggongsi.cn:32188/bbbb/aaaa.htm?qt=2&usid=18635700170")
'hc.Timeout = 5
'hc.Content = UserID
msgbox(1)
[此贴子已经被作者于2018/11/16 16:22:46编辑过]