Re: forcing upload instead of showing doc

From: Date: Tue, 08 May 2001 16:37:27 +0000
Subject: Re: forcing upload instead of showing doc
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51931@lists.php.net to get a copy of this message
It didn't work at all. It started a download, but with a filename called myscriptfilename.html and with the contents of the html (in this case the form) being shown and not the output. I want to set these headers, and then do regular echo statements to this newly created downloading file. >Hi, > > ><? // file to post to >header("Content-Type: application/octet-stream"); >header("Content-Disposition: attachment; filename=name.doc"); >include("file.doc"); >?> > >Wieger > >Christian Dechery wrote: >> >> How do I force an output to be recognized by the browser by a downloadable >> text file as soon as I press the submit button? >> >> what header(*) stuff should I add before echo-ing stuff? >> >> thanks >> >> . [ Christian Dechery ] >> . Webdeveloper @ Tá Na Mesa! >> . Listmaster @ Gaita-L >> . http://www.tanamesa.com.br >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >> For additional commands, e-mail: php-general-help@lists.php.net >> To contact the list administrators, e-mail: php-list-admin@lists.php.net > >-- >Wieger Uffink >tel: +31 20 428 6868 >fax: +31 20 470 6905 >web: http://www.usmedia.nl > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > . [ Christian Dechery ] . Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br

« previous php.general (#51931) next »