delete(); my_doiToFrag($data); } // public function doFrag($data){ // $ts_refer_obj = Db::name('ts_refer'); // if($data['refer_doi']==''){ // return 0; // } // $doi = str_replace('/','%2F',$data['refer_doi']); // $url = "https://citation.crosscite.org/format?doi=$doi&style=american-veterinary-medical-association&lang=en-US"; // $res = myGet($url); // $frag = trim(substr($res,strpos($res,'.')+1)); // file_put_contents("D:/1.txt",$frag); // file_put_contents("D:/2.txt",$ts_refer_obj); // // $ts_refer_obj->where('ts_refer_id',$data['ts_refer_id'])->update(['refer_frag'=>$frag]); // return 1; // } }