Re: PHP/Mysql: Making binary field available for download - extra browser window ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, June 2, 2006 12:59 am, Matthew Pegg wrote:
> Working on a PHP script at the moment where I want to be able to
> extract a file (PDF file) from a mysql database\

That's bad.  Read the archives.

> and force the popup
> of the File Download dialog, to allow the user to either save or open
> the document (ie. and bypass loading the file using the browser's
> plugin)

<?php
  header("Content-type: application/octet-stream");
  echo $pdf;
?>

Any browser that does't do a download prompt for that is severely broken.

Forget the content-disposition crap.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux