dougang8233
dougang8233
2013-11-12 06:52

在mySQL中放置一个图像路径并在Dreamweaver中的php页面上显示

已采纳

For my uni project i have created a website for my local rugby team... I have a database of players and in that database i have a column for profile picture. I was told to just put the path to the image in the player record which i did. The photo doesnt load just the line i put it there. The path i inserted below.... H:\WebDesign2\Xampp\htdocs\BedlinogRFC\images\Benji.jpg Below is my dreamweaver code:

    <div class="playerProfilePhotoContainer">
    <table height="250" width="299" border="0" cellpadding="3">
      <caption>
        Player Photo
      </caption>
      <tr>
        <td><img src="<?php echo $row_Recordset1['ProfilePhoto']; ?>" alt="Profile Photo of Player"/></td>
      </tr>
    </table>
</div>

Can anybody show me where i am going wrong or where i need to change?

Thanks

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dongmiao260399 dongmiao260399 8年前

    This:

    <td height="235"><?php echo $row_Recordset1['ProfilePhoto']; ?></td>
    

    Should be:

    <td height="235"><img src="<?php echo $row_Recordset1['ProfilePhoto']; ?>" alt=""/></td>
    
    点赞 评论 复制链接分享