0
我需要上传blob文件的帮助。上传文件blob php
我有这样的代码:
echo "<tr><td>File document:</td>";echo"<td>";
echo '<a href="download_file.php?FileDocument=' . $show['id']. '">Open file</a>';
我需要帮助下面的代码。 我已经尝试过worked.I只需从最简单的
<?php
include("connect.php");
if (isset($_GET["id"]) && ctype_digit($_GET["id"])) {
$sql = mysql_query("Select * From tb_work where id = $id");
if ($sql) {
if (mysql_num_rows($sql)==1) {
$line = mysql_fetch_row($sql);
$file = $line['FileDocument'];
if ($file!='') {
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/pdf');
header('Content-Transfer-Encoding: binary');
header('Content-Length: '.filesize($file));
echo $file;
}
}
}
}
?>
的结果,这是空白页
你能告诉我们你到目前为止所尝试过的吗? – Dan
是的。会改变问题 – user3253195