POSCMS 版主:POSCMS负责人
请教在中使用提示错误陕西
类型:POSCMS 更新时间:2020-08-08 20:41:28 php

请教在custom.php 中使用$ci->dip->address($t['inputip']) 提示错误

php 95 ---->

ERROR - 2020-08-08 18:33:12 --> Severity: error --> Exception: Call to a member function address() on null D:\wwwroot\config\custom.php 95 ----> 


function vg_excel_ip($cid,$kw='陕西',$pagesize=5000,$page=1) {

  $ci = &get_instance();

 // sql 省略

 foreach ($list as $t) {

  $ipaddress = $ci->dip->address($t['inputip']);

   //省略

}


回帖
  • 姜凯
    #1楼    姜凯
    2020-08-08 20:25:18
    Chrome 0
    你没有加载类 dip
  • POSCMS负责人
    #2楼    POSCMS负责人
    2020-08-08 20:38:04
    Chrome 0
    \Poscms\Service::L('dip');
    $ci = &get_instance();
    满意答案
  • 胡银萍
    #3楼    胡银萍
    2020-08-08 20:41:28
    Chrome 0
    @POSCMS负责人:谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢谢