[Gambas-user] CGI - Hello World

Benoit Minisini gambas at ...1...
Tue Nov 21 20:50:10 CET 2006


On Tuesday 21 November 2006 04:31, Erwin Pogz wrote:
> Hello,
>
> I tried to build a sample hello world  CGI, I use gambas2 1.9.45 but i have
> an error coming out saying
>
>
> Error message:
>     <br />Premature end of script headers: ff.gb
>
> heres my code:
>
> PUBLIC SUB Main()
>   PRINT "Content-type: text/html\n\n"
>   PRINT "Hello World!"
> END
>
>
> I tried to visit http://www.gambasdoc.org/help/comp/gb.web but i cant find
> any sample codes for me to start with. Could somebody give a tips?
>
> Thank you.
>
>
> Regards,
>
> Erwin
>
>

Even if you use gb.web, your program keeps being a CGI script, an what you 
have done seems to be correct, so I think your problem does not come from the 
Gambas program nor the gb.web component.

The gb.web component just provides useful ASP-like classes for managing the 
data sent to the CGI script, and making the answer. This component is made in 
Gambas, so you can look at its source code if you want to understand how it 
works exactly.

Regards,

-- 
Benoit Minisini





More information about the User mailing list