在使用querylist采集百度头像时发生以下错误.可以看到是因为使用的版本较老,php7已经弃用了each()函数,emmm下面是替换的办法.
8Z5B~CGD_$4KVZ[V6GPEJ%5.png

function new_each(&$array){
   $res = array();
   $key = key($array);
   if($key !== null){
       next($array); 
       $res[1] = $res['value'] = $array[$key];
       $res[0] = $res['key'] = $key;
   }else{
       $res = false;
   }
   return $res;
}

添加新函数后
5BR`%()SVV[8E~~M52[ZR$O.png

Last modification:June 8, 2022
If you think my article is useful to you, please feel free to appreciate