Re: Download File Problem - text not appearing on downloaded file

From: Date: Mon, 19 Nov 2001 22:30:37 +0000
Subject: Re: Download File Problem - text not appearing on downloaded file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75161@lists.php.net to get a copy of this message
I dont know if Im pointing out the obvious or if you orgot to post more code. <?PHP header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=file.txt"); // get file data rom db or wherever echo $data; ?> -- Chris Lee lee@mediawaveonline.com "Joe Van Meer" <joe@coastaldestination.com> wrote in message news:20011119154227.83192.qmail@pb1.pair.com... > Hi there. I managed to get the prompt for a file download when a user clicks > on a text link. The file downloads properly to the client machine, howevr, > when I open up the file there is no content. What do I have to add to the > following code to get the content sent back to the user? > > Thx Joe :) > > <?PHP > > header("Content-type: application/octet-stream"); > header("Content-Disposition: attachment; filename=file.txt"); > > ?> > > >

« previous php.general (#75161) next »