if ($stream_size and 0 == $result['size']) { //以控制端请求长度为准 $query .= ',size= ' . $stream_size; } $query .= ' where tid=\'' . $tid . '\' and cid=' . $cid . ' limit 1'; $db->query($query); $ret = 1; } } } } else { //normal if (1 == $result['status']) { $data = @file_get_contents('php://input'); $status = 2; $pipeOk = HYP_IPC::task_response($tid, $cid . ':' . $status . ':', $data); if (!$pipeOk) { if (strlen($data)) { $query = 'replace into ' . $mysql_ini['prefix'] . 'data_response values (?,?,?) '; $stmt = $db->prepare($query); $stmt->bind_param("sis", $tid, $cid, $data); if (!$stmt->execute()) { $status = -100; } $stmt->close(); } } $query = 'update ' . $mysql_ini['prefix'] . 'online_task set status = ' . $status . ' where tid=\'' . $tid . '\' and status=1 and cid=' . $cid . ' limit 1'; $db->query($query); mylog($query); if ('0001' . '0000000000000000000000000000' === $result['module']) {