我正在尝试展示图片。我有一个名为5.png的图像。我的数据库值 $ bnr_value 也正确返回5。但图像没有显示。我该如何解决?
<img src="new_img/header/career/"<?php echo $bnr_value.'png'; ?> alt="" class="image" style="max-width: 100%; ">
答案 0 :(得分:0)
//试试这个..
<img src="new_img/header/career/<?php echo $bnr_value.'.png'; ?>" alt="" class="image" style="max-width: 100%; ">
=> "new_img/header/career/" is a not a full path ..
Example :- "new_img/header/career/<?php echo $bnr_value.'.png'; ?>" // set like this .
答案 1 :(得分:0)
试试这个:
<img src="new_img/header/career/<?php echo $bnr_value.'.png'; ?>" alt="" class="image" style="max-width: 100%; ">