0
我想在網站上顯示記錄,並且表的$ row ['data']在數據庫中報告其類型(BLOB),我想將其顯示爲鏈接,但它不會顯示再也不會出現了。顯示類型BLOB作爲鏈接
我該怎麼辦?這裏有什麼問題?
<?php
include 'connect.php';
extract($_SESSION);
session_start();
?>
<html>
<body >
<table>
<?php
$sql="SELECT data,report.StudID,studFName,StudLName
FROM report,student
WHERE report.SuperID={$_SESSION['supervisor']} AND
report.StudID=student.StudID ";
$result= mysqli_query($con,$sql) or die ("could not found;
".mysqli_error($con));
while ($row=mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo '<a href="data:application/pdf;base64,'.base64_encode($row ['data']).' " height="20" width="20" />'?></td>
<td><?php echo $row['StudLName'] ?></td>
<td><?php echo $row['studFName'] ?></td>
<td><?php echo $row['StudID'] ?></td>
<?php
}
?>
</tr>
</table>
什麼不出現?鏈接或PDF? – Ravi