0) { $data = array(); while ($row = mysqli_fetch_assoc($result)) { $proxy_accs = $row['proxy_acc']; $proxy_phone = $row['proxy_phone']; $proxy_rename = $row['proxy_rename']; $proxy_rename_sta = $row['proxy_rename_sta']; $proxy_sta = $row['proxy_sta']; $proxy_balance = $row['proxy_balance']; // 将代理名和代理头像添加到数据数组中 $data[] = array( "account" => $proxy_accs, "phone" => $proxy_phone, "rename" => $proxy_rename, "rename_sta" => $proxy_rename_sta, "status" => $proxy_sta, "puid" => $proxy_acc, "balance" => $proxy_balance, ); } echo json_encode($data); } else { echo json_encode(array("error" => "没有符合条件的数据")); } } else { echo json_encode(array("error" => "查询出错")); } ?>