微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php smarty模板引擎中的IP API

如何解决php smarty模板引擎中的IP API

我使用PHP smarty模板进行开发,当我在我的网站上使用用户提交表单的ip location finder API时,表单无法提交,而是在查看源代码显示

<script>document.cookie = "humans_21909=1"; document.location.reload(true)</script>

我使用这个网址来收集表单提交时的用户 ipo 地址:

function getfromipdata_lon(){
    $query=@unserialize(file_get_contents('http://ip-api.com/PHP/'.$ipdataloc));
    return $query['lon'];
}


function getfromipdata_lat(){
    $query=@unserialize(file_get_contents('http://ip-api.com/PHP/'.$ipdataloc));
    return $query['lat'];
}

我能知道 smarty 模板引擎是否与这个 ip API 冲突吗?还是有其他冲突?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。