标签:code data public exit reboot 操作 fgets bsp end
public function log() { $file = fopen(PACK_PATH . "/ProjectImg_1902.log", "r"); $myfile = fopen(PACK_PATH . "/url.txt", ‘a‘) or die("Unable to open file!"); while (!feof($file)) { $id = trim(str_replace(‘\r‘, ‘‘, fgets($file))); $res = strstr($id, ‘www.bozhou.gov.cn‘); if (empty($res)) { continue; } else { $start = "data:"; $end = ";msg"; $str = $this->get_between($id, $start, $end); $data = json_decode($str, true); fwrite($myfile, $data[‘picUrl‘] . "\r\n"); // } } echo ‘code died please reboot‘; fclose($myfile); exit(); }
标签:code data public exit reboot 操作 fgets bsp end
原文地址:https://www.cnblogs.com/friendwrite/p/10405815.html