سؤال

I have installed net_geoip on my web host and am encountering the error Fatal error: Class 'Net_GeoIP' not found in /home/heyitspr/public_html/beta_simplecraft.biz/index.php on line 3 when I run the script that is posted below:

$geoip = Net_GeoIP::getInstance('GeoIP.dat', Net_GeoIP::SHARED_MEMORY); $country_name = $geoip->lookupCountryName($_SERVER['REMOTE_ADDR']);

print_r ($country_name);

I am new to installing plugins with apache so please explain it in simpler terms. Thanks

هل كانت مفيدة؟

المحلول

Seems like you have not included your GeoIP library. Try including it on your index.php code

include_once('GeoIP.php');
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top