我有网络服务器和sql服务器工作fin但是当我运行文件时没有显示图像和字符如�})>�}(���>��j|��0�Ry>� 而是出现了。我缺少什么?下面的cobe是页面的一部分。
<body>
<?php
$servername = "localhost";
$user = "root";
$passw = "Ajax3617";
$dbname="sailingdb";
// Create connection
$conn = new mysqli($servername, $user, $passw, $dbname);
$sql = "SELECT picturefile FROM pictures";
$result = mysqli_query($conn,$sql);
while ($row = mysqli_fetch_assoc($result)) {
echo '<img src="'.$row['picturefile'].'" width="175" height="200" />';
} ?>
</body>
</html>
答案 0 :(得分:0)
echo "<img src="'.$row['picturefile']."' >";
应替换为
echo '<img src="'.$row['picturefile'].'" >';