我已经使用此代码显示数据库中的图像,但它显示语法错误.. 这是我的后端代码。
<?php
echo ' <div id="ib-main-wrapper" class="ib-main-wrapper">';
echo ' <div class="ib-main">';
$sql_select = "select * from tbl_photo";
$sql_select = mysql_query($select_image);
while($data = mysql_fetch_array($sql_select)){
echo "<a href="#"><img src='".$path.$data['photo']."' data-largesrc='".$path.$data['photo']."' /><span>".$data['photo']."</span></a>";
}
echo '</div></div>';
?>
它的静态代码是:
<a href="#"><img src="images/upload/Desert.jpg" data-largesrc="images/large/Desert.jpg" alt="image01"/><span>Crabbed Age and Youth</span></a>
请给出答案。。