我对HTML/PHP规则有一个愚蠢的问题。我正在尝试使用以下代码在表格中显示来自Apache
服务器的图片:
<?php
//code
while($row = mysqli_fetch_array($result)) {
echo '
<tr>
<td> '.$row['x'].' </td>
<td> '.$row['y'].' </td>
<td> '.$row['z'].' </td>
<td> '.$row['f'].' </td>
<td> '.$row['g'].' </td>
<td> '.$row['d'].' </td>
<td><img src=\"<?php echo $url; ?>\"/></td>
</tr>';
}
//code
?>
但是显然内部的php脚本被视为普通文本,不会运行!
<?php
has already opened and you are using echo inside another echo. Try thid:<td><img src=\"$url\"/></td>
- bcesars<?php echo $url; ?>
中了 - 今天是第二次了。 - Funk Forty Niner