2024 年 PHP Conference Japan

geoip_setup_custom_directory

(PECL geoip >= 1.1.0)

geoip_setup_custom_directory設定 GeoIP 資料庫的自訂目錄

說明

geoip_setup_custom_directory(字串 $path): void

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

新增註記

使用者貢獻的註記

此頁面沒有使用者貢獻的註記。
To Top