ファイル名を変更し、GeoCity の代わりに GeoIP Lite を使用しようと (GeoCity には 27 MB のファイルが含まれているため、この考えfopen()
には最大値がありました)、などなど、 3 時間以上このエラーをデバッグしようとしています。
これが私の構造ファイル構造です:index.php -> include("configuration/config.php") - config.php -> include("inc/geo_text.php") -> geo_text.php
の内容geo_text.php
は次のとおりです。
$ip = $_SERVER['REMOTE_ADDR'];
include("GeoIP/geoip.inc");
$gi = geoip_open("GeoIP/GeoIP.dat",GEOIP_STANDARD);
$count_name = geoip_country_name_by_addr($gi, $ip);
geoip_close($gi);
echo($count_name);
今、アクセスしgeo_text.php
てもエラーは発生せず、自分の国に配置echo($count_name)
しgeo_text.php
て戻ってきたことを確認するだけです。
ただし、実行するconfig.php
とエラーが返されます。
Warning: fopen(GeoIP/GeoIP.dat) [function.fopen]: failed to open stream: No such file or directory in /nfs/c09/h02/mnt/177978/domains/domain.com/html/labs/final/configuration/inc/GeoIP/geoip.inc on line 399
Can not open GeoIP/GeoIP.dat
なぜこれが考えられるのか、誰かが何か考えを持っていますか?