感谢您的回答,我真的很高兴.. 我编辑了代码,我想问一下,我编辑得好吗?:-)
$result = $sql->query("SELECT * FROM `topic` ;");
while($row = $result->fetch_object())
{
$id=$row->id;
$photo=$row->photo;
$title=$row->title;
$shortinfo=$row->shortinfo;
echo"<div id='article'>
<a href='reporty.php?page=$id'><div id='article_img'><img src='$photo'/></div></a>
<div id='article_text'>
<h2>$title</h2>
<p>$shortinfo</p>
</div>
</div>";