标签:public ice http mini reac func tor files document
要求:
转换成:
代码:
public function testestt() { $tes=file("C:/Users/Administrator/Documents/WeChat Files/sgm4231/FileStorage/File/2019-04/usdt_block_count.txt"); $arr=[]; foreach ($tes as $key=>$v){ if(strstr($v, "rc=")){ $arr[]=$key; }; } $arr1=[]; $arr2=[]; foreach ($arr as $k=>$value){ if($value != 0){ $arr1[]=$value-$arr[$k-1]; $arr2[]=$value; } } array_unshift($arr2,0); array_push($arr1,count($tes)-end($arr2)); $arrs=[]; for ($i=0;$i<count($arr1);$i++){ $arrs[$i]=array_slice($tes,$arr2[$i],$arr1[$i]); } dd($arrs); }
标签:public ice http mini reac func tor files document
原文地址:https://www.cnblogs.com/sgm4231/p/10791491.html