文章詳情頁(yè)
為什么返回值為空?哪里錯(cuò)了,麻煩大佬幫忙改改,謝謝。
瀏覽:96日期:2022-06-05 10:56:55
問(wèn)題描述
<?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'];}}
求大佬幫忙看看
問(wèn)題解答
回答1:你這個(gè)api返回的不是json ,那么你拿到數(shù)據(jù) 后再用json_decode就肯定是空值 了
排行榜

熱門標(biāo)簽