(PECL geoip >= 1.0.1)
geoip_db_filename — 傳回對應 GeoIP 資料庫的檔案名稱
geoip_db_filename() 函式會傳回對應 GeoIP 資料庫的檔案名稱。
這並未指出檔案是否存在於磁碟上,僅表示程式庫搜尋資料庫的位置。
返回對應資料庫的檔案名稱,如果發生錯誤則返回 null
。
範例 #1 geoip_db_filename() 範例
這將輸出對應資料庫的檔案名稱。
<?php
print geoip_db_filename(GEOIP_COUNTRY_EDITION);
?>
以上範例將輸出
/usr/share/GeoIP/GeoIP.dat