You are here: Re: cgi question « HTML « IT news, forums, messages
Re: cgi question

Posted by Steve West on 10/03/05 18:04

"brucie" <shit@usenetshit.info> wrote in message
news:1tqeb87y1gnyc$.dlg@usenetshit.info...
> In post <news:2K2dnXW3XsUCZt3eRVn-pg@comcast.com>,
> Steve West said:
>
>> I am trying to get my client to display the file download/save dialog box
>> and have the client download a file. The code the server is sending is as
>> follows:
>
> just serve the file with the correct mime. let the visitor decide what
> they
> want to do with it. very easy, very simple.
>
Ok got it to work was missing the html on top. But the file name is the name
of the page. It knows it is a text file. here is what I am sending:
fprintfs (client, "HTTP/1.1 200 OK\n");
fprintfs (client,
"Content-Type: text/plain;\n\tname=\"atadrvr.txt\"\n");
fprintfs (client,
"Content-Transfer-Encoding: 7Bit\n");
fprintfs (client,
"Content-Disposition: attachment;\n\tfilename=\"atadrvr.txt\"\n\n");
fprintfs(client, "Hello world\n");

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация