首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

geoip_db_filename

(PECL geoip >= 1.0.1)

geoip_db_filename — Returns the filename of the corresponding GeoIP Database

Description

代码语言:javascript
复制
string geoip_db_filename ( int $database )

The geoip_db_filename() function returns the filename of the corresponding GeoIP Database.

It does not indicate if the file exists or not on disk, only where the library is looking for the database.

Parameters

database

The database type as an integer. You can use the various constants defined with this extension (ie: GEOIP_*_EDITION).

Return Values

Returns the filename of the corresponding database, or NULL on error.

Examples

Example #1 A geoip_db_filename() example

This will output the filename of the corresponding database.

代码语言:javascript
复制
<?php

print?geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>

The above example will output:

代码语言:javascript
复制
/usr/share/GeoIP/GeoIP.dat

← geoip_db_avail

geoip_db_get_all_info →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com