Jump to content

[SOLVED] download.php not working with IE?!


knox203

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.