这是我的代码:
echo "<div class=\"panel-body\" style=\"border-top: 1px solid; border-bottom: 1px solid; border-color:#ddd\">";
echo "<div class=\"vidMR\">";
echo"<div><strong>" . $lang['vldMaker'] . "</strong></div>";
echo"<div>";
$maker = "SELECT vidMaker FROM videoinformation WHERE id=".$row['id'];
if ($result1 = mysqli_query($con, $maker)) {
while ($row2 = mysqli_fetch_row($result1)) {
$values = explode(',',$row2[0]);
foreach($values as $v1)
if (!empty($v1)) {
printf ("<img src=\"addVid/maker/%s.jpg\" class=\"makerImg img-circle\" alt=\"%s.jpg\">", $v1, $v1);
}
}
mysqli_free_result($result1);
}
else{
echo $lang['vldErrorMaRo'];
}
echo"</div>";
echo"<div><strong>" . $lang['vldRoles'] . "</strong></div>";
echo"<div>";
$role = "SELECT vidRoles FROM videoinformation WHERE id=".$row['id'];
if ($result2 = mysqli_query($con, $role)) {
while ($row3 = mysqli_fetch_row($result2)) {
$values = explode(',',$row3[0]);
foreach($values as $v2)
if (!empty($v2)) {
printf ("<img src=\"addVid/roles/%s.jpg\" class=\"roleImg img-circle\" alt=\"%s.jpg\">", $v2, $v2);
}
}
mysqli_free_result($result2);
}
else{
echo $lang['vldErrorMaRo'];
}
echo "</div>";
echo"</div></div>";
问题是此代码仅适用于chrome和opera,但IE和Mozilla中的图片不会显示...
我尝试了不同的方法......比如为图片添加完整路径等等......但是不管怎样它都不适合在IE和Mozilla中工作。
这是HTML ...
<body>
<div class="vidMR">
<div>
<strong>Maker:</strong>
</div>
<div><img alt="Name1.jpg" class="makerImg img-circle" src=
"addVid/maker/Name1.jpg"><img alt="Name2.jpg" class=
"makerImg img-circle" src="addVid/maker/Name2.jpg"></div>
<div>
<strong>Roles:</strong>
</div>
<div><img alt="Name1.jpg" class="roleImg img-circle" src=
"addVid/roles/Name1.jpg"><img alt="Name2.jpg" class=
"roleImg img-circle" src="addVid/roles/Name2.jpg"><img alt="Name3.jpg"
class="roleImg img-circle" src="addVid/roles/Name3.jpg"></div>
</div>
</body>
</html>