GNU cgicc

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
 
(未显示1个用户的6个中间版本)
第1行: 第1行:
 +
{{top news}}
 +
[[Image:GNU-cgicc.png|right]]
 +
 
GNU cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web.  
 
GNU cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web.  
  
第34行: 第37行:
 
Include files: /usr/include/cgicc/...
 
Include files: /usr/include/cgicc/...
  
 
+
==Example==
 +
cd demo
 +
sh ../libtool --mode=install cp *.cgi /var/www/cgi-bin/
 +
修改 .html 文件中 cgi 的指向
 +
cp *.html /var/www/html
 +
http://localhost/html/cookie.html
 +
http://localhost/html/test.html
 +
http://localhost/html/upload.html
 +
http://localhost/cgi-bin/dns.cgi
 +
 +
[[testcgi.html]]
 +
[[testcgi.cpp]]
 +
g++ -o testcgi -I/usr/include testcgi.cpp /usr/lib/libcgicc.a // Compile and static link
 +
g++ -o testcgi -I/usr/include testcgi.cpp -L/usr/lib/ -lcgicc // Dynamic Link (at run time)
 +
 +
Place web page in: /var/www/html/testcgi.html
 +
Place cgi in: /usr/lib/cgi-bin/testcgi
 +
restart Apache: service httpd start
 +
Test: http://localhost/testcgi.html
 +
(from http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CGI.html)
 
==Links==
 
==Links==
*http://www.cgicc.org/
+
*http://www.gnu.org/software/cgicc/
 +
*http://download.huihoo.com/gnu/cgicc/
 +
*http://docs.huihoo.com/gnu/cgicc/
 +
 
 +
[[Category:GNU]]
 +
[[Category:C++]]

2010年9月27日 (一) 03:51的最后版本

GNU-cgicc.png

GNU cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web.

目录

[编辑] Functions

  • Parses both GET and POST form data transparently.
  • Provides string, integer, floating-point and single- and multiple-choice retrieval methods for form data.
  • Provides methods for saving and restoring CGI environments to aid in application debugging.
  • Provides full on-the-fly HTML generation capabilities, with support for cookies.
  • Supports HTTP file upload.
  • Compatible with FastCGI.

[编辑] Compilers

  • gcc versions 2.8.1 and greater
  • Hewlett-Packard aCC
  • Microsoft Visual C++ 6.0
  • Borland C++ Builder 5.0

[编辑] Install

Download: ftp://ftp.cgicc.org/

Unpack: tar xzf cgicc-X.X.X.tar.gz

Build Libraries:

cd cgicc-X.X.X/
./configure 
 make
 make install 

Libraries:

/usr/lib/libcgicc.a

        libcgicc.la
        libcgicc.so             
        libcgicc.so.5            
        libcgicc.so.5.0.1

Include files: /usr/include/cgicc/...

[编辑] Example

cd demo
sh ../libtool --mode=install cp *.cgi /var/www/cgi-bin/
修改 .html 文件中 cgi 的指向 
cp *.html /var/www/html
http://localhost/html/cookie.html
http://localhost/html/test.html
http://localhost/html/upload.html
http://localhost/cgi-bin/dns.cgi

testcgi.html
testcgi.cpp
g++ -o testcgi -I/usr/include testcgi.cpp /usr/lib/libcgicc.a // Compile and static link
g++ -o testcgi -I/usr/include testcgi.cpp -L/usr/lib/ -lcgicc // Dynamic Link (at run time)

Place web page in: /var/www/html/testcgi.html
Place cgi in: /usr/lib/cgi-bin/testcgi
restart Apache: service httpd start
Test: http://localhost/testcgi.html 

(from http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CGI.html)

[编辑] Links

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱