-
Notifications
You must be signed in to change notification settings - Fork 2.9k
php内存查询方式,有时不返回结果 #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
➜ ip2region git:(master) php binding/php/search_test.php --db=./data/ip2region.xdb |
ip2region xdb searcher test program, cachePolicy: vectorIndex |
已经基本确定和php版本有关系,前面测试使用的是php 5.6.3,使用php 8版本测试没有问题。 |
我遇到相同的问题,定位出来是32位平台的问题,IP(如果大于128.0.0.0) >> 24/16可能溢出,解决方法就是修改XdbSearcher.class.php $il0 = intval(explode(".",$ipp)[0]); |
使用php 内存查询方式,经常碰到返回结果为null的情况,一开始以为是地址库中没有采集,后来在使用c#语言查询时使用相同的xdb库文件,查询时会有结果。
几个示例IP地址:
222.216.106.191
222.216.131.251
223.104.195.122
查询了ip.merge.txt文件中确实包含这几个对应的ip地址段,麻烦看下是什么问题呢?
The text was updated successfully, but these errors were encountered: