PHP 8.4.0 RC4 available for testing

geoip_db_filename

(PECL geoip >= 1.0.1)

geoip_db_filenameReturns the filename of the corresponding GeoIP Database

Опис

geoip_db_filename(int $database): string

The geoip_db_filename() function returns the filename of the corresponding GeoIP Database.

It does not indicate if the file exists or not on disk, only where the library is looking for the database.

Параметри

database

The database type as an integer. You can use the various constants defined with this extension (ie: GEOIP_*_EDITION).

Значення, що повертаються

Returns the filename of the corresponding database, or null on error.

Приклади

Приклад #1 A geoip_db_filename() example

This will output the filename of the corresponding database.

<?php

print geoip_db_filename(GEOIP_COUNTRY_EDITION);

?>

Поданий вище приклад виведе:

/usr/share/GeoIP/GeoIP.dat

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top