⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cgi.h

📁 计费部分源程序。我认为该软件极好
💻 H
字号:
/*34567890123456789012345678901234567890123456789012345678901234567890123456789

**

** File      cgi.h

**

** Desc      A CGI library for C programmers. Automatically handles GET, POST

**           and ISINDEX requests, with lots of useful routines to simplify

**           CGI development. Applications can even be debugged from the

**           commandline!

**

** Limits    Cannot yet handle form file uploads.

**

** Copyright 1996 JemTek Pty Ltd, Jerome Munchenberg

**           http://www.jemtek.com.au/jemtek

**           jerome@jemtek.com.au

**

** History   Ver  Date     Author Modification

**           1.0  06-03-96 JEM    First Draft

**                29-07-96 JEM    Fixed error messages in main

**	          31-08-96 JEM    Swapped LFs for NLs

**

******************************************************************************/



/* Library structures

******************************************************************************/



struct {

  char *authType;

  int   contentLength;

  char *contentType;

  char *gatewayInterface;

  char *httpAccept;

  char *httpHost;

  char *httpReferer;

  char *httpUserAgent;

  char *pathInfo;

  char *pathTranslated;

  char *queryString;

  char *remoteAddr;

  char *remoteHost;

  char *remoteIdent;

  char *remoteUser;

  char *requestMethod;

  char *scriptName;

  char *serverName;

  char *serverPort;

  char *serverProtocol;

  char *serverSoftware;

} cgiEnv;



/* Library functions

******************************************************************************/



/* --- debug functions --- */



void  cgiDisplayEnv();

void  cgiDisplayPairs();



/* --- data encode/decode functions --- */



char *cgiEncodeSys(char *data);

char *cgiEncodeUrl(char *data);



/* --- form query functions --- */



int   cgiFormCmpVal(char *var, char *val);

int   cgiFormCmpValMulti(char *var, char len, char **vals);



int   cgiFormCntVar(char *var);



char *cgiFormGetVal(char *var);

int   cgiFormGetValMulti(char *var, char ***vals);



/* --- html header functions --- */



int   cgiHeaderContent(char *mimeType);

int   cgiHeaderLocation(char *redirectUrl);

int   cgiHeaderStatus(int statusCode, char *statusReason, char *statusMesg);

int   cgiHeaderNonParse(int statusCode, char *statusMesg, char *mimeType);



/* --- html body functions --- */



int   cgiHtmlHead(char *title);

int   cgiHtmlTail();



/* --- misc utility functions --- */



int   cgiImageOk();



int   cgiLoad(char *file);



int   cgiPrintf(char *fmt, ...);



/* Externally defined variables

******************************************************************************/



extern char *cgiDebug;



/* Externally defined functions

******************************************************************************/



extern int cgiMain();



/* The End

******************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -