我是编程的新手,但至少在中级水平,这种类型的错误让人心旷神怡。我在谷歌搜索了这么多资源,但没有找到任何富有成效的解决方案。 这是我的代码:
error_reporting(E_ALL);
ini_set('display_errors', '1');
$q = "SELECT * FROM songs where 1";
$r = mysqli_query($con, $q);
while($row = mysqli_fetch_array($r))
{
echo "<a href='download.php?id=<?php echo $row['id']; ?>
'><img src='images/a.jpg' height='80' width='80'></a>" . "<br>
<br>
"; echo $row['name']. "<br>
"; echo $row['artist']. "<br>
"; echo $row['file']. "<br>
"; echo $row['size']. "<br>
<br>
<br>
";
}
请帮助我,谢谢你们所有的人。
答案 0 :(得分:0)
这是适合您的正确代码:
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
$q = "SELECT * FROM songs where 1";
$r = mysqli_query($con, $q);
while($row = mysqli_fetch_array($r))
{ ?>
<a href='download.php?id=<?php echo $row['id'];?>'> <img src='images/a.jpg' height='80' width='80'></a>
<br>
<br>
<?php echo $row['name'];?> <br />
<?php echo $row['artist'];?> <br />
<?php echo $row['file'];?> <br />
<?php echo $row['size'];?> <br />
<br><?php
}
?>