Geo IP Location geoip_setup_custom_directory

(PECL geoip >= 1.1.0)

geoip_setup_custom_directory — GeoIP 데이터베이스에 대한 사용자 지정 디렉터리 설정


설명

geoip_setup_custom_directory(string $path): void

geoip_setup_custom_directory() 함수는 GeoIP 데이터베이스의 기본 디렉토리를 변경합니다. 이는 geoip.custom_directory를 변경하는 것과 동일합니다.


매개변수

path
GeoIP 데이터베이스가 디스크에 있는 전체 경로입니다.

반환 값

값이 반환되지 않습니다.


Examples

예제 #1 geoip_setup_custom_directory() 예제

이렇게 하면 GeoIP 기본 데이터베이스 경로가 변경됩니다.

                  
<?php

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

print geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>
                  
                

위의 예는 다음을 출력합니다.

/some/other/path/GeoIP.dat