knox203 Posted August 21, 2008 Share Posted August 21, 2008 Can anyone tell me why I can't download pdf's from a MySQL Blob field when it works just fine in Firefox and others? <?php require_once("conduit/ic_commission.php"); $invoice_num = $_GET['invoice_num']; $query = "SELECT invoice_num, invoice, invoice_name FROM $databasename.invoice where invoice_num=$invoice_num"; $result = mysql_query($query); $data = mysql_result($result,0,"invoice"); $name = mysql_result($result,0,"invoice_name"); header("Cache-Control: must-revalidate"); header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=$name"); header("Content-Length: ".filesize($data)); header("Pragma: no-cache"); header("Content-transfer-encoding: binary"); echo $data; ?> Muchas gracias! Link to comment https://forums.phpfreaks.com/topic/120665-solved-downloadphp-not-working-with-ie/ Share on other sites More sharing options...
The Little Guy Posted August 21, 2008 Share Posted August 21, 2008 Try this: http://phpsnips.com/snippet.php?id=55 Link to comment https://forums.phpfreaks.com/topic/120665-solved-downloadphp-not-working-with-ie/#findComment-621795 Share on other sites More sharing options...
knox203 Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks, worked like a charm! Link to comment https://forums.phpfreaks.com/topic/120665-solved-downloadphp-not-working-with-ie/#findComment-622083 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.