The following script works beautifully except for PDF documents:
I'm not sure if I have a problem with settings on my own computer, or if something in the code must be tweaked to accommodate PDF documents. I get a dialogue box which says :
Cannot find 'some really long cryptic name in a temporary folder on my computer.php' Make sure the path or internet address is correct
Can somebody help me?
MrsBean
Code:
$blobId = $_REQUEST[fileId];
if(!is_numeric($blobId))
die("Invalid blobId specified");
include("dbConnection.php");
$dbQuery = "SELECT blobType, blobData ";
$dbQuery .= "FROM phForms ";
$dbQuery .= "WHERE blobId = $blobId";
$result = mysql_query($dbQuery) or die("Couldn't get file list");
if(mysql_num_rows($result) == 1)
{
$fileType = @mysql_result($result, 0, "blobType");
$fileContent = @mysql_result($result, 0, "blobData");
header("Content-type: $fileType");
echo $fileContent;
}
else
{
echo "Record doesn't exist.";
}
I'm not sure if I have a problem with settings on my own computer, or if something in the code must be tweaked to accommodate PDF documents. I get a dialogue box which says :
Cannot find 'some really long cryptic name in a temporary folder on my computer.php' Make sure the path or internet address is correct
Can somebody help me?
MrsBean