我将所有内容都更改为 mysqli,因为我只是在努力学习它。我究竟做错了什么?我的图像出现损坏并打印文件名,我知道这是一个简单的问题,但我尝试在互联网上搜索但没有结果。对不起我在学习
<?php
include_once("db_conex.php");
$query = "SELECT * FROM employees ORDER BY price ASC";
$query = mysqli_real_escape_string($db,$query);
if($result = mysqli_query($db,$query)){
while($row = mysqli_fetch_object($result)){
echo "<br /><br />";
echo '<img src="/upload/ " border=0>', $row->photo;
echo "<br /><br />";
echo '<b> City: </b>', $row->city;
echo '<b> Price: </b>', $row->price;
echo '<b> Bath: </b>', $row->bath;
echo '<b> Bath: </b>', $row->bed;
echo '<b> Description: </b>', $row->description;
echo '<b> Link: </b>', $row->link;
}
mysqli_free_result($result);
}
//Close Connection
mysqli_close($db);
?>