Re: [PHP] file downloads From: Andrew Etemadi (andy <email protected>)
Date: 08/15/00

Use the following:

header("Content-Type: application/somethingunknownhere");
header("Content-Disposition: attachment;filename=download.txt");

"Robert J. Cissell" wrote:

> Does anyone know the proper order and use of headers to force a file download instead of display? I have tried every combination I can find on the php.net docs and several other php sites. Each time I try with my test file: leopard.gif, the filename that comes up in the dialog box is the php file I want to force the download: download.phtml, and the size of the file it downloads is always 12 bytes, even though its a 46k file. Thanks for help.
>
> Robert

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>