我在 PHP 中发出 CURL 请求,并尝试回显 ID 结果。
$responseData = request();
echo $responseData["id"];
结果是
{
"result":{
"code":"000.200.100",
"description":"successfully created checkout"
},
"buildNumber":"3b5605d6df9e6068ff1e9b178947fc41e641456e@2019-11-26 03:42:27 +0000",
"timestamp":"2019-11-27 13:19:29+0000",
"ndc":"B244D47DBFAD13EDEF126C980A711C8D.uat01-vm-tx02",
"id":"B244D47DBFAD13EDEF126C980A711C8D.uat01-vm-tx02"
}
但是在尝试获取 ID 时出现错误
Warning: Illegal string offset 'id' in \public\payment\index.php on line 25
月关宝盒
繁星淼淼