(PECL geoip >= 1.1.0)
geoip_setup_custom_directory — 設定 GeoIP 資料庫的自訂目錄
geoip_setup_custom_directory() 函式將會更改 GeoIP 資料庫的預設目錄。這相當於更改 geoip.custom_directory。
path
GeoIP 資料庫在磁碟上的完整路徑。
不回傳任何值。
範例 #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