Php/docs/function.geoip-setup-custom-directory

提供:Dev Guides
< Php
移動先:案内検索

geoip_setup_custom_directory

(PECL geoip >= 1.1.0)

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


説明

geoip_setup_custom_directory ( string $path ) : void

geoip_setup_custom_directory() 関数は、 GeoIPデータベースのデフォルトディレクトリを変更します。 これは geoip.custom_directory を変更することと同等です。


パラメータ

path
ディスク上に置くGeoIP データベースのフルパス。


返り値

値を返しません。


例1 geoip_setup_custom_directory() の例

この例は、GeoIP のデータベースパスを変更します。


<?phpgeoip_setup_custom_directory('/some/other/path');print geoip_db_filename(GEOIP_COUNTRY_EDITION);?>

上の例の出力は以下となります。


/some/other/path/GeoIP.dat