[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] jeg kan ikke udføre cgi (c++)



content-type skal være det allerførste, for ellers kan resten ikke
forståes som HTML. Det skal heller ikke være som meta-equiv, men det
allerførste du sender skal være:
printf( "Content-type: text/html\n\n" ); Derefter kan du fortsætte med
printf( "<HTML>" ); o.s.v.

Bemærk også at der skal være to gange \n, der indikerer at der nu kommer
en helt anden kodedel. Din server-log vil i øvrigt sige noget om invalid
termination of segment headers, hvis der er noget galt med
dokument-strukturen.

Det er i øvrigt en god idé at være rundhåndet med fflush() når man laver
CGI.

Med venlig hilsen
Søren H. Sørensen

[Har lavet meget CGI de sidste par år]


Kjeld Vang Larsen wrote:
> 
> Du skal huske, at du selv skal skrive f.eks. content type, når du laver
> "rå" CGI.
> 
> Det vil side, at dit program nok skulle starte med noget i stil med
> cout << "Content-type: text/html" << endl << endl;
> 
> Men det har jeg jo også; den er i 3. linie. Eller det er måske ikke tidligt
> nok. Skal det være som den første??
> 
> Kjeld


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *