【发布时间】:2014-09-30 09:13:32
【问题描述】:
我正在尝试通过 maxmind 检索国家/地区代码 javascript 但返回 null 为什么? ** 想通过国家代码获取时区。**
一旦我得到国家代码,我就想实施它。我在这里得到了时区数据。但是javascript返回null
https://github.com/maxromanovsky/php-maxmind-geoip/blob/master/timezone/timezone.php
<script src="http://j.maxmind.com/app/geoip.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$("#country").html( 'Country: ' + geoip_country_code() );
<?php $country = geoip_country_code(); ?>
</script>
<div id="country"></div>
【问题讨论】:
标签: javascript php maxmind