资源简介
嵌入式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实现
相关资源
- arcgis10.5 server+desktop
- 中英文献 ajax技术 翻译与原文
- ajax弹出框,页面精选1
- ae自定义工具条,arcgis engine
- 三调ArcGIS符号库.rar
- thingsboard之MQTT接入TB说明0531.docx
- 学校小测试:nodejs实现简单购物车.
- On Screen Keyboard.zip
- 用ARCGIS对地形图的裁剪
- ArcGIS 10.4全套地址
- arcgis_enterprise10.7.txt
- Arcgis10.0
- ArcGIS Server 10.5 ecp01-jan-2027
- ADBKeyBoard完美解决ADB输入中文
- 用OC storyboard写的计算器
- qt虚拟键盘26键和数字键
- 在线聊天系统ssh整合开发struts spring
- ArcGIS 10.4全套
- ArcGIS10下的影像分类模型
- ArcGis Server 10.0种子及授权文件
- springboot+ajax
-
AjaxControlToolkit-fr
amework3.5SP1 - CardboardSDKForUnity
- spawn-fcgi-1.6.4 for Windows
- 利用OpenGL和ArcGIS处理得到的坐标数据
- boa源码支持HTTPS
- H5仪表盘,温度计,风向表
- TinyHTTPd for Windows源码
- ArcGIS Engine 实现简单的投影转换
- boa web server
评论
共有 条评论