« geoip_region_name_by_code
geoip_time_zone_by_country_and_region »

geoip_setup_custom_directory

(PECL geoip >= 1.1.0)

geoip_setup_custom_directory — GeoIP データベースのカスタムディレクトリを設定する

説明

function geoip_setup_custom_directory(string $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
関連キーワード:
geoip   GeoIP   custom   directory   setup   データベース   path   カスタム   region   code   time   zone   country   ディスク   フルパス   データベースパス   print   filename
関連する関数・ページ:
function.geoip-db-filename   geoip.configuration   ref.geoip   book.geoip   function.geoip-database-info   function.geoip-db-avail