note 40989 deleted from function.header by kennyt
| From: | kennyt@php.net | Date: | Sun, 18 Jul 2004 18:04:16 +0000 |
| Subject: | note 40989 deleted from function.header by kennyt | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73554@lists.php.net to get a copy of this message | ||
Note Submitter: blaxpear@hotmail.com [www.blaxpear.com]
----
When trying to download a Binary from MySQL via the browser, Mozilla will add an extra
'.php' extention to the fileName. [installer.exe.php -- instead of -- installer.exe]
A simple workaround or patch I found was by passing the fileName in the download URL. For example:
http://www.mydomain.com/download.php?installer.exe
Instead of simply using:
http://www.mydomain.com/download.php
Don't forget to use the appropriate headers too;
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="installer.exe"');
Have fun!... :-)