How does thinkphp get the returned value?

A set of data

is returned after simulated login using curl.

how do I get the st value under data?

$info = $this->curl_post_https("https://xxx/Home/logindo?fromSite=6",$cookie = tempnam("E:\wwwroot\tp5\public","cookie"),$data);
return $info["content"]["data"]["st"];

in this way,: Illegal string offset "content" is reported directly

.
Mar.02,2021

The estimated value returned by

is a string, which is processed using json_decode.

$info = json_decode($info, true);

this is data in json format that you can convert to array format via
json_decode ($data,true); so that you can get


in the way you write.
  

your return value is in json format. After conversion, you can print it out and take a look at the data structure. However, it is best to make a judgment to prevent the data from reporting errors for Null.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5e1ad-45781.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5e1ad-45781.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?