Php 从服务器上的路径回显图片,并在sql中使用图片名称

Php 从服务器上的路径回显图片,并在sql中使用图片名称,php,Php,我正在为我的问题寻找解决方案,我现在使用的代码将显示文件名,而不是图片本身。我想我的回显码有问题 这是我正在使用的代码: echo "<table class=showtable>"; echo "<tr> <td class=show >".$row['ID']."</td> <td class=show2>".$row['DateTime']."</td> <td class=show3>".$row['St

我正在为我的问题寻找解决方案,我现在使用的代码将显示文件名,而不是图片本身。我想我的回显码有问题

这是我正在使用的代码:

echo "<table class=showtable>";
echo "<tr>
<td class=show >".$row['ID']."</td>
<td class=show2>".$row['DateTime']."</td>
<td class=show3>".$row['Stock']."</td>
<td class=show4>".$typeArray[$row['Type']]."</td>
<td class=show5>".$tradeArray[$row['Trade']]."</td>
<td class=show5>".$row['Entry']."</td>
<td class=show5>".$row['Stoploss']."</td>
<td class=show5>".$row['Target1']."</td>
<td class=show5>".$row['Target2']."</td>
<td class=show6>".$row['Explination']."</td>
<td class=show7>'<img src='/trades.tiniduske.be/upload/'/>". print $row['Screenshot']  ." </td> </tr>";
 echo "</table>";
echo”“;
回声“
“$row['ID']”
“$row['DateTime']”
“$row[‘股票’]”
“$typeArray[$row['Type']]”。”
“$tradeArray[$row['Trade']]”
“$row['Entry']”
“$row[‘止损’]”
“$row['Target1']”
“$row['Target2']”
“$row[‘解释’]”
'". 打印$row[“屏幕截图]”;
回声“;
echo';

您需要指定网页,例如www.yourdomain.com/path\u to\u image,其中path\u to\u image相对于您的web根目录。。而不是您服务器上的文件系统路径。

您能再添加一点代码吗?您在哪里初始化$row?你如何回音出上面这一行;回显“$row['ID']”..$row['DateTime']”..$row['Stock']..$typeArray[$row['Type']..“$tradeArray[$row['Trade']..$row['Entry'.$row['Stoploss'.$row['Target1'.$row['Target2'.$row['explation'..”。打印$row[“屏幕截图]”;回声“;
echo '<td class=show7><img src="/home/tiniduske/domains/tiniduske.be/public_html/trades/upload/ . $row['Screenshot'] . '"/> </td> </tr>';