找回密码
 加入
搜索
查看: 1590|回复: 1

[IE类操作] 获取外网ip的例子数组都报错是什么问题?

[复制链接]
发表于 2016-8-28 14:31:02 | 显示全部楼层 |阅读模式
#include <Inet.au3>
                $s_URL = 'http://www.ip138.com/ip2city.asp'
                $sText = _INetGetSource($s_URL)
                Local $name = StringRegExp($sText, '(?i)\[(.*?)\]', 3)
                MsgBox(16+32, "错误!",$name[0])


错误如下:
+>14:28:02 AU3Check 完成[CODE]:0
>运行:(3.3.9.0):E:\Autoit3\autoit3_x64.exe "F:\autoit\ip3.au3"   
"F:\autoit\ip3.au3" (7) : ==> ??????????.:
MsgBox(16+32, "???",$name[0])
MsgBox(16+32, "???",$name^ ERROR


是我64位系统的原因么?
发表于 2016-8-28 22:01:15 | 显示全部楼层
在第三行后加上ConsoleWrite($sText & @CRLF),发现返回的网页源码为空,所以数组不存在,越界报错
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 16:26 , Processed in 0.072859 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表