【发布时间】:2017-09-29 22:36:52
【问题描述】:
我在根目录的成员文件夹中有一组上传的图像。 页面加载时图像未显示。 当我检查元素时,我得到了正确的图片名称和其他参数,但图片没有显示出来。
This is the output image i'm getting
This is the result of inspect element
我在 localhost 中使用了相同的代码,它工作正常并且所有图像都已加载。但是现在我切换到 hostgator 它不显示图像。
<tr style="color:grey; font-size:15px;">
<td width="1%"><? echo $headdata['USERID']; ?></td>
<td width="1%"><img src="/members/<? echo $headdata['USERPIC']; ?>" width="150" height="150" ></td>
<td width="1%"><? echo $headdata['NAME'];?></td>
<td width="1%"><? echo $headdata['AGE'];?></td>
<td width="1%"><? echo $headdata['SEX'];?></td>
<td width="1%"><? echo $headdata['MOBILE'];?></td>
<td width="1%"><? echo $headdata['TYPE'];?></td>
<?
$txtreceived = $headdata['ID'];
$IDS = encrypt_decrypt('encrypt', $txtreceived);
?>
<td width="1%">
<a href="editmemberdetails.php?UpdateId=<? echo $IDS; ?>" class="btn btn-sm btn-primary">
<i class="fa fa-pencil"></i>
</a>
<a href="editmember.php?UpdateId=<? echo $IDS; ?>" class="btn btn-sm btn-danger">
<i class="fa fa-times"></i>
</a>
</td>
</tr>
【问题讨论】:
-
检查你的文件夹
path -
路径是否正确?
-
试试这个
<td width="1%"><img src="http://www.your_domain.com/path/members/<? echo $headdata['USERPIC']; ?>" width="150" height="150" ></td> -
不要使用短标签
标签: javascript php html html-table