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

geoip_setup_custom_directory

(PECL geoip >= 1.1.0)

geoip_setup_custom_directory — Set a custom directory for the GeoIP database.

Description

代码语言:javascript
复制
void geoip_setup_custom_directory ( string $path )

The geoip_setup_custom_directory() function will change the default directory of the GeoIP database. This is equivalent to changing geoip.custom_directory.

Parameters

path

The full path of where the GeoIP database is on disk.

Return Values

No value is returned.

Examples

Example #1 A geoip_setup_custom_directory() example

This will change the GeoIP default database path.

代码语言:javascript
复制
<?php

geoip_setup_custom_directory('/some/other/path');

print?geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>

The above example will output:

代码语言:javascript
复制
/some/other/path/GeoIP.dat

← geoip_region_name_by_code

geoip_time_zone_by_country_and_region →

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com