你好亲爱的溢出者!
我有一个到目前为止运行良好的小代码,它将相应的图像 ID 获取到相应的房屋 ID,标题和文件名也没有问题!我只是无法显示图像... :( `
include("functions/config.php");
$images_dir = "/some/url/that/is/correct/cms/houses/";
$query = "SELECT houses.*, gallery_photos.* ".
"FROM houses LEFT JOIN gallery_photos ".
"ON houses.id = gallery_photos.photo_category";
$result = mysql_query($query) or die(mysql_error());
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result)){
$house_id = $row['id'];
$photo_category = $row['photo_category'];
$photo_caption = $row['photo_caption'];
$photo_filename = $row['photo_filename'];
echo "House ID ". $house_id. " - ". $photo_category." - ". $photo_caption." - <img src='".$images_dir.$photo_filename."' />";
echo "<br />";
}
?>`
如前所述,一切都得到了很好的选择,当您在浏览器中单击图像信息时,即使图像路径是正确的,但我根本没有显示图像,我在这里遗漏了一些非常琐碎的东西吗?
提前致谢!