<?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']; }}
求大佬帮忙看看
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你这个api返回的不是json ,那么你拿到数据 后再用json_decode就肯定是空值 了