查看: 2207|回复: 2
收起左侧

Raspcontrol 显示公网ip

2013-5-6 16:12:46 | 显示全部楼层 |阅读模式
文件目录下
detail.php

37行 增加一个function
  1. function external_ip(){
  2.     $ip_json = trim(file_get_contents("http://pv.sohu.com/cityjson?ie=utf-8"));
  3.     $ip_json = substr($ip_json, 19);
  4.     $ip_json = substr($ip_json, 0, -1);
  5.     $ip_arr = json_decode($ip_json,true);
  6.     return $ip_arr['cip'];
  7. }
复制代码
向下。。。[internal]后。。增加

  1. IP: <span class="text-info"><?php echo external_ip(); ?></span> [external]
复制代码
显示公网ip

微博桌面截图_20130506161228.jpg



回复

使用道具 举报

2013-5-8 11:21:59 | 显示全部楼层
哪个文件目录下 有 这个detail.php文件,没找到
回复 支持 反对

使用道具 举报

 楼主| 2013-5-8 11:34:07 | 显示全部楼层
sorry pages/details.php
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热点推荐

关注我们,了解更多

官方微信

服务时间:10:00-16:00

13714503811

公司地址:深圳市龙岗区南湾街道东门头路8号

Copyright © 2012-2020 Powered by 树莓派论坛 2019.4  粤ICP备15075382号-1
快速回复 返回列表 返回顶部