Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000
 Neatware Snaml
Search
  CGI
Home  : Last Update: Wed Apr 12 19:58:39 2000

 
Snaml -- CGI

 
Snaml Basic
      Introduction
      Syntax
      Control
      Types
      Modules
      Status
Snaml HTML
      HTML
      Structure
      Link
      Objects
      Text
      Font
Snaml CSS
      CSS
      Script
Snaml CGI
      CGI
      Variables
      Output
      Form
      Application
Snaml XML
      XML
      Document
      EBNF
  • Introduction

    CGI (Common Gateway Interface) is a protocol that connects a web client to a web server. CGI program is a filter that gets input from a client, manipulate data on the server, and feedback result to the client. CGI turns a static web site into an interactive and dynamic web site. One CGI application accepts the HTML form data from a client and returns a HTML page. Another CGI application is gateway where CGI program forms a SQL query and generates user readable information retrived from a database. Finally, a CGI program is suitable to generate dynamic documents.

    CGI program runs on a web server. Usually it is located on a subdirectory called cgi-bin. When server receives a command such as "get /cgi-bin/default.cgi HTTP 1.0", the default.cgi program will start to run. HTTP 1.0 is a communication protocol. CGI program will receive its input from stdin or environment variables in an operating system. It will send outputs to stdout. By using redirection CGI may easily change the output target.

    _cgi command specifies a list of CGI headers. The 'Content-type' header specifies the type of CGI's returning data.

    # launch snaml program
    #!/usr/local/bin/snaml
    _cgi "Content-type: text/html"
    _html
    _head
      _title; _quote "CGI"; title_
    head_
    _body
      _quote "Simplest CGI Program."
    body_
    html_
    

  • Introduction

         
    Home  : Last Update: Wed Apr 12 19:58:39 2000
    Search
      CGI
     Neatware Snaml
    Home    News    Product    Order    Forum    Feedback    Partner    Profile  © Neatware 2000