Hi,
I wonder if anyone can help me with this. I have a recordset to get the names of files to download, these are mostly PDFs so I have added the code to output a PDF file. If the file is not pdf I want to output it in the correct format.
So
if (file is pdf) {
// We'll be outputting a PDF
header('Content-type: application/pdf');
// called download.pdf
header('Content-Disposition: inline; filename="download.pdf"');
// The source of the PDF
readfile("../pathtofile/".$row_rsFilelist['filename']);
} else {
//we'll output probably just a link
}
any help would be appreciated.
Thanks 🙂