搜尋

首頁  >  問答  >  主體

為什麼回傳值為空?哪裡錯了,麻煩大佬幫忙改改,謝謝。

<?phpinclude "wechat.class.php";function getda($w){ $r=file_get_content("http://api.lyoo.xyz/xiaochengxu/chati.php?w=".$w); $s=json_decode($r,true); if($s['code']==200) { $tm=$s['tm']; $da=$s['da']; return ":$tm"."\n".":$da"."\n".; } else{ return $s['msg']; }}

請大佬幫忙看看

手机用户1589615777手机用户15896157771744 天前1458

全部回覆(1)我來回復

  • 秋香姐家的小书童

    秋香姐家的小书童2020-05-18 08:34:27

    你這個api回傳的不是json ,那你拿到資料 後再用json_decode就一定是空值 了

    回覆
    0
  • 取消回覆