RE: cgi

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm sure it is executing on the server.  How else would the browser know 
what image to display?

puts(1,"Location: /resource.xxx\n\n")
This tells the browser to load whatever the resource is, from the server 
running the cgi.  This is in place of content-type.  Nothing else needs 
to be sent to the browser, the browser just gets whatever is at the 
location and displays that.  It could be an image, video, another 
webpage, whatever.

I can pass an absolute to it as well:
puts(1,"Location: http://www.server.com/resource.xxx\n\n")  

I would only need puts(1,"Content-Type: text/html\n\n") if I were about 
to create a dynamic webpage.  I would follow that with:
puts(1,"<html><head>...") etc.  Then I could script the page to look 
like anything.  But this isn't what I'm trying to do.  The cgi code is 
working...I'm trying to eliminate the window popping up that would make 
my program irritating to run on a regular users desktop.  It needs to 
run silently.

-=Cassidy=-
 
r.schr at t-online.de wrote:
> Cassidy Napoli wrote:
> >  
> > I could live with this, but I want to distribute the program, and it
> > doesn't do any good if you're trying to get work done and a dos-box
> > keeps opening and shutting on you.
> > 
> Are you sure your program runs on the CGI server? It look like it runs
> simply under your local CMD window in DOS mode. The first output line in
> your CGI program has to be:
> 
> puts(1,"Content-Type: text/html\n\n")
> 
> Do you have this starting line?
> 
> Have a nice day, Rolf
> 
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu