3546.php :代码:
$yinyong =array();
$rs= $db->query("SELECT title,keywords,id FROM jp_archives LIMIT 0,2");while($rows =$db->fetch_array($rs)){
$yinyong[] =$rows;
}
echo json_encode($yinyong);
<?php
$ar =file_get_contents("http://127.0.0.1/destoon/3546.php");
$ars =json_decode($ar,true);
var_dump($ars);
foreach($ars as $v){
echo $v['title'];
}
?>