后端getdata.php代码如下:include('./conn/conn.php');
$query= "select id,content,pubtime,imgsrc,thumbsrc from messages order by id desc";
$result=mysql_query($query);
while( $row = mysql_fetch_array( $result ) ) {
$json[] = $row;
}
echo json_encode($json);
exit;?>前端我想这么显示:
前端javascript代码:Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
{{pubtime}}