Re: file downloads

From: Date: Wed, 16 Aug 2000 00:57:34 +0000
Subject: Re: file downloads
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11893@lists.php.net to get a copy of this message
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

« previous php.general (#11893) next »