我正在使用函数(来自CSS Trics的片段)来获取基于 IP 的用户所在的国家/地区。在本地主机上(在我的计算机上)它可以正常工作,但是一旦我转移并尝试了网站,这就是我得到的错误:
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Error contacting Geo-IP-Server' in
/home/elsaorgr/public_html/application/core/MY_Controller.php:72
Stack trace: #0 /home/elsaorgr/public_html/application/core/MY_Controller.php(47): MY_Controller->geo_check_ip('178.223.146.253')
#1 /home/elsaorgr/public_html/application/core/MY_Controller.php(13): MY_Controller->_check_lang()
#2 /home/elsaorgr/public_html/application/libraries/ends/Frontend_Controller.php(7): MY_Controller->__construct()
#3 /home/elsaorgr/public_html/application/controllers/home.php(7): Frontend_Controller->__construct()
#4 /home/elsaorgr/public_html/system/core/CodeIgniter.php(308): Home->__construct()
#5 /home/elsaorgr/public_html/index.php(202): require_once('/home/elsaorgr/...')
#6 {main} thrown in /home/elsaorgr/public_html/application/core/MY_Controller.php on line 72
此错误是否与主机设置有关?(我正在使用 CodeIgniter 2.1)