Common Gateway Interface

来自开放百科 - 灰狐
2007年2月8日 (四) 17:53Allen (讨论 | 贡献)的版本

跳转到: 导航, 搜索

目录

C/C++

Examples

#include <rude/database.h>
#include <iostream>
using namespace std;
using namespace rude;
void doStuff(void)
{
        Database *database = Database::instance("mycontext");
        if(database->executeQuery("select * from test"))
        {
                cout << "Successful\n"
        }
        else
        {
                cout << database->getError() << "\n";
        }
}
int main(void)
{
        Database::addContext("mycontext","test","root","huihoo","localhost",3306);
        doStuff();
        Database::finish();
        return 0;
}
g++ testmysql.cpp /usr/lib/rudedatabase.lib /usr/lib/libmysqlclient.so

debian:/var/www/cgi-bin# ./testmysql 
Successful

Debian包

  • libcgicc-doc - A C++ class library for writing CGI applications
  • libcgicc1 - A C++ class library for writing CGI applications
  • libcgicc1-dev - A C++ class library for writing CGI applications
  • libcgicg1 - C library for developing CGI applications
  • libcgicg1-dev - C library for developing CGI applications
  • libecgi-dev - An ANSI C library for the creation of CGI applications
  • libecgi0 - An ANSI C library for the creation of CGI applications
  • libfcgi-dev - Header files of FastCGI
  • libgcgi-dev - library for CGI programs in C
  • libgcgi0 - library for CGI programs in C
  • namazu2 - Full text search engine (namazu binary and cgi)
  • namazu2-common - Full text search engine (Document files)
  • namazu2-index-tools - Full text search engine (Tools for index handling)


Resource

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

变换
操作
导航
工具箱