請(qǐng)教在custom.php 中使用$ci->dip->address($t['inputip']) 提示錯(cuò)誤
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']);
//省略
}
你沒有加載類 dip
\Poscms\Service::L('dip'); $ci = &get_instance();開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!