资源简介
嵌入式liunx下,基于boa,cgi的ajax 表单异步提交demo。
代码片段和文件信息
/* cgicTempDir is the only setting you are likely to need
to change in this file. */
/* Used only in Unix environments in conjunction with mkstemp().
Elsewhere (Windows) temporary files go where the tmpnam()
function suggests. If this behavior does not work for you
modify the getTempFileName() function to suit your needs. */
#define cgicTempDir “/tmp“
#if CGICDEBUG
#define CGICDEBUGSTART \
{ \
FILE *dout; \
dout = fopen(“/home/boutell/public_html/debug“ “a“); \
#define CGICDEBUGEND \
fclose(dout); \
}
#else /* CGICDEBUG */
#define CGICDEBUGSTART
#define CGICDEBUGEND
#endif /* CGICDEBUG */
#include
#include
#include
#include
#include
#include
#include
#ifdef WIN32
#include
/* cgic 2.01 */
#include
#else
#include
#endif /* WIN32 */
#include “cgic.h“
#define cgiStrEq(a b) (!strcmp((a) (b)))
char *cgiServerSoftware;
char *cgiServerName;
char *cgiGatewayInterface;
char *cgiServerProtocol;
char *cgiServerPort;
char *cgiRequestMethod;
char *cgiPathInfo;
char *cgiPathTranslated;
char *cgiscriptName;
char *cgiQueryString;
char *cgiRemoteHost;
char *cgiRemoteAddr;
char *cgiAuthType;
char *cgiRemoteUser;
char *cgiRemoteIdent;
char cgiContentTypeData[1024];
char *cgiContentType = cgiContentTypeData;
char *cgiMultipartBoundary;
char *cgiCookie;
int cgiContentLength;
char *cgiAccept;
char *cgiUserAgent;
char *cgiReferrer;
FILE *cgiIn;
FILE *cgiOut;
/* True if CGI environment was restored from a file. */
static int cgiRestored = 0;
static void cgiGetenv(char **s char *var);
typedef enum {
cgiParseSuccess
cgiParseMemory
cgiParseIO
} cgiParseResultType;
/* One form entry consisting of an attribute-value pair
and an optional filename and content type. All of
these are guaranteed to be valid null-terminated strings
which will be of length zero in the event that the
field is not present with the exception of tfileName
which will be null when ‘in‘ is null. DO NOT MODIFY THESE
VALUES. Make local copies if modifications are desired. */
typedef struct cgiFormEntryStruct {
char *attr;
/* value is populated for regular form fields only.
For file uploads it points to an empty string and file
upload data should be read from the file tfileName. */
char *value;
/* When fileName is not an empty string tfileName is not null
and ‘value‘ points to an empty string. */
/* Valid for both files and regular fields; does not include
terminating null of regular fields. */
int valueLength;
char *fileName;
char *contentType;
/* Temporary file name for working storage of file uploads. */
char *tfileName;
struct cgiFormEntryStruct *next;
} cgiFormEntry;
/* The first form entry. */
static cgiFormEntry *cgiFormEntryFirst;
static cgiParseResultType cgiParseGetFormInput();
static cgiParseResultType cgiParsePostFormInput();
static cgiParseResultType cgiParsePostMultipartInput();
static cgiParseResultType
- 上一篇:组态王在楼宇监控的应用
- 下一篇:DDS的FPGA实现
相关资源
- jQuery ajax实现简单登录验证
- ArcGIS Engine最优路径分析
- arcgis engine实现叠加分析
- arcgis 10.1 中文环境安装包
- HOOK 记录和模拟 Keyboard Mouse
- Arcgis 扩展模块
- Ajax定时读取数据库(源代码发布)
- 仿126 网易 163 邮箱 界面
- AJAX下载
- shp转cad小工具
- 插件式GIS应用框架的设计与实现&mda
- 中国工具——gis插件
- ArcGiS手把手教程三——配准和矢
- arcgis_workstation地址
- ArcGIS_ArcInfo_9.3_Workstation_DVD_BT
- MT7621A-Board.pdf
- 硬盘安装工具 CGI 3.2多核心,纯净且功
- Information Dashboard Design 中文译文
- 全国耕地质量大数据平台
- arcpy语法教程入门以及ArcGIS的脚本构建
- ArcGis 编辑过程自动保存插件
- ArcGIS10.3 AfCore.dll重要破解文件
- 广东电子地图.rar
- 基于ArcGIS Engine的三维校园路灯管理系
- ZEDBoard实现OV7725显示Verilog
- 基于ajax的web聊天室
- 全国省级市级县级矢量地图数据
- 完整的中国矢量地图gis数据
- 中国省市县ArcGIS地图数据(县边界线
- 基于DE2开发板的VGA显示模块,仅供大
评论
共有 条评论