Transplantation and use of cgic Library

Source: Internet
Author: User

1. Transplantation of cgic Library

Cgic is a standard C library that supports CGI development. It can be used for free. You only need to make a public declaration in the developed site and program documentation, indicating that the program uses the cgic library, users can also purchase commercial licenses without making a public statement.

Cgic provides the following functions:
1. analyze data and automatically correct data sent from defective browsers;
2. transparently receive from data sent using the get or POST method;
3. files can be uploaded;
4. Set and receive cookies;
5. process the carriage return in the from element in a consistent way;
6. Provides the string, integer, floating point, single-choice or multiple-choice function to receive data;
7. Provides border check for numeric fields;
8. It can convert CGI Environment Variables into non-null strings in C;
9. Provides CGI program debugging means to play back the CGI status during CGI program execution;

Cgic is a powerful Standard C library that supports CGI development and supports multiple operating systems such as Linux, UNIX, and windows.

The following describes the migration process:

1. Download the source code package from the main cgic site http://www.boutell.com/cgic/:cgic205.tar.gz. the latest version is 2.05;

2. Decompress cgic205.tar.gz and enter the source code directory;

Tar xzvf cgic205.tar.gz

CD cgic205

3. Compile cgic

Make

The obtained cgic library libcgic. A file

NOTE: If it is transplanted to the embedded platform, the parameters such as the compilation command and AR in the MAKEFILE file need to be changed accordingly, such as CC = GCC, change to CC = Cc = arm-hismall-Linux-GCC.

4. Put the compiled capture file and cgictest. cgi file in the cgi-bin directory of the Web server;

5. Enter the following address in the browser address bar of the client:

Http: // 192.168.78.128: 8080/cgi-bin/cgictest. cgi

The page is displayed, indicating that the cgic library and test script are successfully transplanted!

Note: You need to change the cgi-bin directory under the Web Server Directory to readable, writable, and executable (chmod-r 777). Otherwise, the page cannot be accessed.

Related Article

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.