ECS PHP 在RPC调用时,查询多个实例ID时,总是报错。

已解决

Array ( [RequestId] => 745A729A-BB80-5A32-9AD9-FA8322BEA132 [Message] => The input parameter "InstanceId" that is mandatory for processing this request is not supplied.

我用 $InstanceId = "["i-wz97fy4b6bcixy618ogb","i-wz9ipw515phhyy0pi0sw","i-wz9fy3e213ujdnx7651"]" ;也是报错 用JSON格式 {"i-wz97fy4b6bcixy618ogb","i-wz9ipw515phhyy0pi0sw","i-wz9fy3e213ujdnx7651"} 一样报错,请问多个实例ID要怎么弄? 哪位大哥指点一下,谢谢。

展开
收起
游客nuthtwcyhqdae 2022-03-30 09:49:13 2033 分享 版权
2 条回答
写回答
取消 提交回答
  • 推荐回答

    调用DescribeInstances查询ECS实例的详细信息,请参考此文档:https://help.aliyun.com/document_detail/25506.html image.png

    2023-01-06 12:37:36
    赞同 展开评论
  • global $db;$ar=explode(',',$CD_ID);foreach($ar as $CD_ID){ $sql='Select * from '.tname('dj').' where CD_ID='.$CD_ID.''; $row=$db->getrow($sql); $server=$db->getrow('select * from '.tname('server').' where CD_ID='.$row['CD_Server'].''); if($row){ $CD_Url=$row['CD_Url']; $playurl=$server['CD_Url'].$CD_Url; echo '';}}

    2022-05-23 12:42:55
    赞同 展开评论