Re: Download textfile

From: Date: Tue, 20 Nov 2001 13:04:31 +0000
Subject: Re: Download textfile
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75236@lists.php.net to get a copy of this message
Hi Arno, I was shown this code yesterday...it will allow a download of a file. Of course you'll have to change the file name :) Cheers Joe <?php header("Content-type: application/x-octet-stream "); header("Content-Disposition: attachment; filename=file.txt"); header("Content-Transfer-Encoding: ascii"); readfile("file.txt"); ?> "Arno" <arno@nothing.com> wrote in message news:20011120124818.61723.qmail@pb1.pair.com... > When I link a textfile, the textfile is opened in the browser. I want the > SaveAs box to be shown. Is this possible and if so how to do that? > > TIA > >

« previous php.general (#75236) next »