我晕了。

3gw 2006-02-10 02:12:11
'进行站点基本配置
Dim NewBindings
NewBindings = Array(0, 0)
NewBindings(0) = ":80:ok.com"
NewBindings(1) = ":80:www.ok.com"
NewWebServer.ServerBindings = NewBindings
上面的可以正常运行,


'下面的却不行
'其中mvarServerBindings=":80:ok.com,:80:www.ok.com"
Dim NewBindings() As String
NewBindings = Split(mvarServerBindings, ",") '// 劈分处
NewWebServer.ServerBindings = NewBindings

看似简单的不能再简单了,为什么就是不行?
...全文
111 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
rainstormmaster 2006-02-10
  • 打赏
  • 举报
回复
区别在:
前者为Variant型数组

后者为string型数组
凯晰叶子 2006-02-10
  • 打赏
  • 举报
回复
UP,来接分了
3gw 2006-02-10
  • 打赏
  • 举报
回复
'进行站点基本配置
Dim NewBindings
NewBindings = Array(0, 0)
NewBindings(0) = ":80:ok.com"
NewBindings(1) = ":80:www.ok.com"
NewWebServer.ServerBindings = NewBindings
上面的可以正常运行,

NewWebServer.ServerBindings应该也是数组类型,要不然,上面的符值不会成功的。
benyfeifei 2006-02-10
  • 打赏
  • 举报
回复
Dim NewBindings() As String 'NewBindings是一个数组类型,而NewWebServer.ServerBindings应该是字符串类型吧。出错的原因就是类型不匹配。

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧