geoip_record_by_name什么都不返回? [英] geoip_record_by_name returns nothing?

查看:162
本文介绍了geoip_record_by_name什么都不返回?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了本教程 http://tech.cibul.net/install-maxminds-geoip-ip-database-on-ubuntu-for-php/,并从中进行了所有操作.在我的Ubuntu 11.10安装中编译了geoip模块以及php扩展.

I tried this tutorial http://tech.cibul.net/install-maxminds-geoip-ip-database-on-ubuntu-for-php/ and did everything from it. Compiled the geoip module and also the php extension on my Ubuntu 11.10 installation.

我也尝试了这个更简单的终端命令

I also tried this more simpler terminal command

(sudo) apt-get install php5-geoip 

它显示安装成功,但是当我尝试

And it showed successful installation but when I try

geoip_record_by_name('127.0.0.1')

,它仍然不提供任何内容,即完全没有数组.

and it still gives nothing, i.e. no array at all.

推荐答案

尝试使用其他IP地址-例如,在检查本地主机(127.0.0.1)时使用111.111.111.111-它可能始终无法在本地运行.

Try a different IP address - for example 111.111.111.111 as you are checking your localhost (127.0.0.1) - it may not run locally anyway.

请参见 geoip_record_by_name 文档 :

See geoip_record_by_nameDocs:

成功返回关联数组,如果在数据库中找不到该地址,则返回FALSE.

您找回FALSE,因为在数据库中找不到该地址.

You get back FALSE because the address was not found in the database.

这篇关于geoip_record_by_name什么都不返回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆