[Country EMBED strategy] [174] [CGI QuickStart-Web control LED]

Source: Internet
Author: User
Tags html form

CGI Program (Common Gate-Interface)

A program that is called by the server outside the server to allow the server to perform more powerful functions after the CGI program is mated to the server.

1. The browser requests a URL to a CGI application through an HTML form or hyperlink.

2. The server receives the request.

3. The server executes the specified CGI application.

4.CGI applications perform the actions required, usually based on what the browser has entered.

5.CGI applications format the results as Web servers and browsers can understand documents (usually HTML pages).

6. The Web server returns the results to the browser.

Porting a CGI library

1. Unzip

Tar zxvf cgic205.tar.gz

2. Modify Makefile

CD cgic205

Vim Makefile

Modify tool chain to arm-linux-

3. Compiling

Make

5. Copy Library files

CP libcgic.a .../rootfs/lib

6. Modify the BOA configuration file

scriptalias/app//web/app/specifying the CGI program path

7. Modify the Web page

<a class= "Menu" href= "/led.html" >led control </a>

The tag invokes the CGI program through action, and the parameter is passed to the CGI program via the URL address.

Writing CGI Programs

Compiling CGI programs

Arm-linux-gcc–l./cgic205–lcgic-i./cgic205 Led.c–o led.cgi

-L represents the library file path,-l represents the library file to include,-I represents the header file path

[Country EMBED strategy] [174] [CGI QuickStart-Web control LED]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.