以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]报错: 找不到字段:“UserCode._website”。 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=185009) |
-- 作者:moseser -- 发布时间:2023/1/30 12:01:00 -- [求助]报错: 找不到字段:“UserCode._website”。 Dim str_txt As String = ProjectPath & "config.txt" If FileSys.FileExists(str_txt) Then Dim strs As String = FileSys.ReadAllText(str_txt, Encoding.Default) Dim rs() As String = strs.Split("|") If rs.Length = 3 Then _website = rs(0).ToString _webchat = rs(1).ToString _phone = rs(2).ToString End If Else Messagebox.Show("文件不存在或已经被删除!", "提示") End If 报错: 找不到字段:“UserCode._website”。 其中 _website _webchat _phone 是我定义的全局变量 string类型 txt 文本里面的内容是: website:www.baidu.com|Contact:13988888888|webchat:xxxxxx 报错是什么原因啊? |
-- 作者:有点蓝 -- 发布时间:2023/1/30 12:04:00 -- 提示没有_website这个全局变量。全局变量怎么定义的?上面代码放在哪里的? |
-- 作者:moseser -- 发布时间:2023/1/30 12:17:00 -- 回复:(有点蓝)提示没有_website这个全局变量。全局... Public _website As String Public _webchat As String Public _phone As String 在全局代码中定义的,
|
-- 作者:有点蓝 -- 发布时间:2023/1/30 13:32:00 -- 1楼代码放在哪里的? |
-- 作者:moseser -- 发布时间:2023/1/30 14:52:00 -- 回复:(有点蓝)1楼代码放在哪里的? afteropenproject |
-- 作者:有点蓝 -- 发布时间:2023/1/30 14:53:00 -- 那不应该有问题,请上传实例说明 |