亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cgic.html

?? 一般的UNIX系統都支持ANSI C,增加相應的庫函數(和相應的h文件)就可以實現CGI,用于CGI編程的ANSI C庫
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
	fprintf(cgiOut, "&lt;input type=\"radio\" name=\"age\" "		"value=\"2\"&gt;2\n");	fprintf(cgiOut, "&lt;input type=\"radio\" name=\"age\" "		"value=\"3\" checked&gt;3\n");	fprintf(cgiOut, "&lt;input type=\"radio\" name=\"age\" "		"value=\"4\"&gt;4\n");	fprintf(cgiOut, "&lt;p&gt;Nonexclusive Checkbox Group: "		"Voting for Zero through Four Candidates\n");	fprintf(cgiOut, "&lt;input type=\"checkbox\" name=\"vote\" "		"value=\"A\"&gt;A\n");	fprintf(cgiOut, "&lt;input type=\"checkbox\" name=\"vote\" "		"value=\"B\"&gt;B\n");	fprintf(cgiOut, "&lt;input type=\"checkbox\" name=\"vote\" "		"value=\"C\"&gt;C\n");	fprintf(cgiOut, "&lt;input type=\"checkbox\" name=\"vote\" "		"value=\"D\"&gt;D\n");	fprintf(cgiOut, "&lt;p&gt;File Upload:\n");	fprintf(cgiOut, "&lt;input type=\"file\" name=\"file\" "		"value=\"\"&gt; (Select A Local File)\n");	fprintf(cgiOut, "&lt;p&gt;\n");	fprintf(cgiOut, "&lt;p&gt;Set a Cookie&lt;p&gt;\n");	fprintf(cgiOut, "&lt;input name=\"cname\" "		"value=\"\"&gt; Cookie Name\n");	fprintf(cgiOut, "&lt;input name=\"cvalue\" "		"value=\"\"&gt; Cookie Value&lt;p&gt;\n");	fprintf(cgiOut, "&lt;input type=\"submit\" "		"name=\"testcgic\" value=\"Submit Request\"&gt;\n");	fprintf(cgiOut, "&lt;input type=\"reset\" "		"value=\"Reset Request\"&gt;\n");	fprintf(cgiOut, "&lt;p&gt;Save the CGI Environment&lt;p&gt;\n");	fprintf(cgiOut, "Pressing this button will submit the form, then "		"save the CGI environment so that it can be replayed later "		"by calling cgiReadEnvironment (in a debugger, for "		"instance).&lt;p&gt;\n");	fprintf(cgiOut, "&lt;input type=\"submit\" name=\"saveenvironment\" "		"value=\"Save Environment\"&gt;\n");	fprintf(cgiOut, "&lt;/form&gt;\n");}</pre>Note the use of <code>enctype="multipart/form-data"</code> in the<code>FORM</code> tag. This is absolutely required if the formwill contain file upload fields, as in the above example. Mostbrowsers will not even attempt file uploads without thepresence of this attribute.<h4>Examining CGI environment variables</h4>The CGI standard specifies a number of environment variableswhich are set by the server. However, servers are somewhatunpredictable as to whether these variables will be null orpoint to empty strings when an environment variable is not set.Also, in order to allow the programmer to restore savedCGI environments, the cgic library needs have a way of insulatingthe programmer from the actual environment variables.<p>Instead of calling getenv() to determine the value of avariable such as HTTP_USER_AGENT (the browser software being used),always use the<a href="#variables">cgic copies of the environment variables</a>,which are always valid C strings (they are never null, althoughthey may point to an empty string). For instance, the cgicvariable containing the name of the browser software is<a href="#cgiUserAgent">cgiUserAgent</a>. The referring URL appearsin the variable <a href="#cgiReferrer">cgiReferrer</a>.<h3><a name="images">How can I generate images from my cgic application?</a></h3>cgic can be used in conjunction with the<a href="http://www.boutell.com/gd/">gd graphics library</a>, whichcan produce GIF images on the fly.<p>The following short sample program hints at the possibilities:<pre>#include "cgic.h"#include "gd.h"char *colors[] = {	"red", "green", "blue"};#define colorsTotal 3int cgiMain() {	int colorChosen;	gdImagePtr im;	int r, g, b;	/* Use gd to create an image */	im = gdImageCreate(64, 64);	r = gdImageColorAllocate(im, 255, 0, 0);		g = gdImageColorAllocate(im, 0, 255, 0);		b = gdImageColorAllocate(im, 0, 0, 255);		/* Now use cgic to find out what color the user requested */	<a href="#cgiFormSelectSingle">cgiFormSelectSingle</a>("color", 3, &amp;colorChosen, 0);		/* Now fill with the desired color */	switch(colorChosen) {		case 0:		gdImageFill(im, 32, 32, r);		break;		case 1:		gdImageFill(im, 32, 32, g);		break;		case 2:		gdImageFill(im, 32, 32, b);		break;	}		/* Now output the image. Note the content type! */	cgiHeaderContentType("image/gif");	/* Send the image to cgiOut */	gdImageGif(im, cgiOut);	/* Free the gd image */	gdImageDestroy(im);	return 0;}</pre>Note that this program would need to be linked with both cgic.oand libgd.a. Often programs of this type respond to onecgiPathInfo value or set of form fields by returning an HTML page with an inline image reference that, in turn, generates a GIF image.<h3><a name="debug">Debugging CGI applications: using capture</a></h3>Debugging CGI applications can be a painful task. Since CGI applicationsrun in a special environment created by the web server, it is difficultto execute them in a debugger. However, the cgic library provides a way of capturing "live" CGI environments to a file, and also provides a wayto reload saved environments. <p>The provided program 'capture.c' can be used to capture CGIenvironments. Just change the first line of the cgiMain() functionof capture.c to save the CGI environment to a filename appropriateon your system and type 'make capture'. Then place capture in yourcgi directory and set the form action or other link you want to testto point to it. When the form submission or other link takes place,capture will write the CGI environment active at that time tothe filename you specified in the source. The<a href="#cgiReadEnvironment">cgiReadEnvironment()</a> function can then be invoked on the same filename at the beginning of the cgiMain() function of the application you want to test in order to restore the captured environment.  You can then execute your program in the debugger of your choice,and it should perform exactly as it would have performed hadit been launched by the actual web server, including file uploads,cookies and all other phenomena within the purview of cgic.<p><strong>Important:</strong> Make sure you specify the full path, as thecurrent working directory of a CGI script may not be what youthink it is!<p><strong>Even More Important:</strong> If you call getenv() yourselfin your code, instead of using the provided <a href="#variables">cgic copies of the CGI environment variables</a>, you will<em>not</em> get the values you expect when running witha saved CGI environment. Always use the cgic variables insteadof calling getenv().<h3><a name="functions">cgic function reference</a></h3><dl><br><dt><strong><a name="cgiFormString">cgiFormResultType cgiFormString(	char *name, char *result, int max)</a></strong><br><dd>cgiFormString attempts to retrieve the string sent for the	specified input field. The text will be copied into	the buffer specified by result, up to but not	exceeding max-1 bytes; a terminating null is then	added to complete the string. Regardless of the newline	format submitted by the browser, cgiFormString always	encodes each newline as a single line feed (ascii decimal 10); as	a result the final string may be slightly shorter than indicated	by a call to <a href="#cgiFormStringSpaceNeeded">	cgiFormStringSpaceNeeded</a> but will never be longer.	cgiFormString returns <a href="#cgiFormSuccess">cgiFormSuccess</a> if the string was 	successfully retrieved, 	<a href="#cgiFormTruncated">cgiFormTruncated</a> if the string was	retrieved but was truncated to fit the buffer,	cgiFormEmpty if the string was 	retrieved but was empty, and <a href="#cgiFormNotFound">cgiFormNotFound</a> if no 	such input field was submitted. In the last case, 	an empty string is copied to result. <br><br><dt><strong><a name="cgiFormStringNoNewlines">cgiFormResultType cgiFormStringNoNewlines(	char *name, char *result, int max)</a></strong><br><dd>cgiFormStringNoNewlines() is exactly equivalent to <a href="#cgiFormString">	cgiFormString()</a>, except	that any carriage returns or line feeds that occur in the input	will be stripped out. The use of this function is recommended	for single-line text input fields, as some browsers will submit	carriage returns and line feeds when they should not. <br><br><dt><strong><a name="cgiFormStringSpaceNeeded">cgiFormResultType cgiFormStringSpaceNeeded(	char *name, int *length)</a></strong><br><dd>cgiFormStringSpaceNeeded() is used to determine the length of the input text 	buffer needed to receive the contents of the specified input field. 	This is useful if the programmer wishes to allocate sufficient memory 	for input of arbitrary length. The actual length of the string 	retrieved by a subsequent call to cgiFormString() may be slightly shorter	but will never be longer than *result. On success, cgiFormStringSpaceNeeded() 	sets the value pointed to by length to the number of bytes of data, 	including the terminating null, and returns <a href="#cgiFormSuccess">cgiFormSuccess</a>. If no 	value was submitted for the specified field, cgiFormStringSpaceNeeded sets 	the value pointed to by length to 1 and returns <a href="#cgiFormNotFound">cgiFormNotFound</a>. 1 is	set to ensure space for an empty string (a single null	character) if cgiFormString is called despite the return value.<br><br><dt><strong><a name="cgiFormStringMultiple">cgiFormResultType cgiFormStringMultiple(	char *name, char ***ptrToStringArray)</a></strong><br><dd>cgiFormStringMultiple is useful in the unusual case in which several	input elements in the form have the same name and, for whatever	reason, the programmer does not wish to use the checkbox, radio 	button and selection menu functions provided below. This is	occasionally needed if the programmer cannot know 	in advance what values might appear in a multiple-selection list	or group of checkboxes on a form. The value pointed to	by result will be set to a pointer to an array of strings; the last	entry in the array will be a null pointer.  This array is allocated 	by the CGI library. Important: when done working with the array,	you must call cgiStringArrayFree() with the array pointer as the 	argument.  cgiFormStringMultiple() returns <a href="#cgiFormSuccess">cgiFormSuccess</a> if at least	one occurrence of the name is found, <a href="#cgiFormNotFound">cgiFormNotFound</a>	if no occurrences are found, or cgiFormMemory if not enough	memory is available to allocate the array to be returned.	In all cases except the last, ptrToStringArray is set to point to a 	valid array of strings, with the last element in the array being a 	null pointer; in the out-of-memory case ptrToStringArray is set to 	a null pointer.<br><br><dt><strong><a name="cgiFormEntries">cgiFormResultType cgiFormEntries(	char *name, char ***ptrToStringArray)</a></strong><br><dd>cgiFormEntries is useful when the programmer cannot know the names	of all relevant form fields in advance. The value pointed to	by result will be set to a pointer to an array of strings; the last	entry in the array will be a null pointer.  This array is allocated 	by the CGI library. Important: when done working with the array,	you must call cgiStringArrayFree() with the array pointer as the 	argument. cgiFormEntries() returns <a href="#cgiFormSuccess">cgiFormSuccess</a> except in the event of an out of memory error.	On success, ptrToStringArray is set to point to a 	valid array of strings, with the last element in the array being a 	null pointer; in the out-of-memory case ptrToStringArray is set to 	a null pointer, and 	<a href="#cgiFormOutOfMemory">cgiFormOutOfMemory</a> is returned.<br><br><dt><strong><a name="cgiStringArrayFree">void cgiStringArrayFree(char **stringArray)</a></strong><br><dd>cgiStringArrayFree() is used to free the memory associated with	a string array created by 	<a href="#cgiFormStringMultiple">cgiFormStringMultiple()</a>,	<a href="#cgiFormEntries">cgiFormEntries()</a>, or	<a href="#cgiFormCookies">cgiFormCookies()</a>.<br><br><dt><strong><a name="cgiFormInteger">cgiFormResultType cgiFormInteger(	char *name, int *result, int defaultV)</a></strong><br><dd>cgiFormInteger() attempts to retrieve the integer sent for the	specified input field. The value pointed to by result	will be set to the value submitted. cgiFormInteger() returns 	cgiFormSuccess if the value was successfully retrieved,	cgiFormEmpty if the value submitted is an empty string,	cgiFormBadType if the value submitted is not an integer,	and <a href="#cgiFormNotFound">cgiFormNotFound</a> if no such input field was submitted. 	In the last three cases, the value pointed to by result	is set to the specified default.<br><br><dt><strong><a name="cgiFormIntegerBounded">cgiFormResultType cgiFormIntegerBounded(	char *name, int *result, int min, int max, int defaultV)</a></strong><br><dd>cgiFormIntegerBounded() attempts to retrieve the integer sent for the	specified input field, and constrains the result to be within	the specified bounds. The value pointed to by result	will be set to the value submitted. cgiFormIntegerBounded() returns 	cgiFormSuccess if the value was successfully retrieved,	<a href="#cgiFormConstrained">cgiFormConstrained</a> if the value was out of bounds and result	was adjusted accordingly, <a href="#cgiFormEmpty">cgiFormEmpty</a> if the value submitted is 	an empty string, <a href="#cgiFormBadType">cgiFormBadType</a> if the value submitted is not an 	integer, and <a href="#cgiFormNotFound">cgiFormNotFound</a> if no such input field was submitted. 	In the last three cases, the value pointed to by result	is set to the specified default.<br><br><dt><strong><a name="cgiFormDouble">cgiFormResultType cgiFormDouble(	char *name, double *result, double defaultV)</a></strong><br><dd>cgiFormDouble attempts to retrieve the floating-point value sent for 	the specified input field. The value pointed to by result	will be set to the value submitted. cgiFormDouble returns 	cgiFormSuccess if the value was successfully retrieved,	cgiFormEmpty if the value submitted is an empty string,	cgiFormBadType if the value submitted is not a number,	and <a href="#cgiFormNotFound">cgiFormNotFound</a> if no such input field was submitted. 	In the last three cases, the value pointed to by result	is set to the specified default. <br><br><dt><strong><a name=

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲一区二区三区妖精 | 国产日产精品一区| 成人午夜碰碰视频| 国产三级久久久| 日韩亚洲欧美在线| 91久久精品网| 成人网男人的天堂| 天堂精品中文字幕在线| 中文字幕一区二区三区不卡在线 | 欧美无砖砖区免费| 懂色中文一区二区在线播放| 麻豆成人免费电影| 午夜在线成人av| 欧美激情在线一区二区| 日韩三级视频在线观看| 欧美美女直播网站| 欧美日韩一区精品| 国产一区视频网站| 韩国一区二区在线观看| 精品一区二区三区视频| 麻豆精品一区二区av白丝在线| 亚洲一区二区三区在线看| 一区二区三区中文在线观看| 亚洲黄色录像片| 综合激情网...| 有码一区二区三区| 亚洲国产精品麻豆| 精品制服美女久久| 狠狠久久亚洲欧美| 国产一区 二区| 99久久精品久久久久久清纯| 99视频在线精品| 色狠狠一区二区三区香蕉| 欧美日本在线一区| 久久婷婷一区二区三区| 欧美高清在线一区| 国产精品一区久久久久| 91丝袜美腿高跟国产极品老师| 欧美体内she精视频| 日本精品视频一区二区三区| 欧美日韩一区二区三区在线| 日韩无一区二区| 中文文精品字幕一区二区| 精品国产一区二区三区久久久蜜月| 精品国产欧美一区二区| 中文字幕精品三区| 午夜不卡av在线| 成人免费看的视频| 3d成人h动漫网站入口| 国产精品免费视频观看| 婷婷中文字幕一区三区| 国产成人自拍网| 91在线精品一区二区三区| 欧美二区三区的天堂| 中文字幕一区二区三| 首页欧美精品中文字幕| 成人午夜av电影| 精品国产百合女同互慰| 一区二区高清在线| 精品久久免费看| 午夜在线成人av| 在线一区二区三区做爰视频网站| 久久久午夜精品| 久久激情综合网| 在线免费一区三区| 亚洲欧美日韩国产成人精品影院| 国产一区日韩二区欧美三区| 欧美一级二级在线观看| 亚洲综合丁香婷婷六月香| av成人老司机| 国产精品盗摄一区二区三区| 国产精品77777| 精品伦理精品一区| 日本欧美一区二区在线观看| 欧美视频一区二区三区在线观看 | 国产米奇在线777精品观看| 欧美一级国产精品| 久久精品国产精品亚洲精品| 91性感美女视频| 亚洲三级视频在线观看| 成人免费av在线| 亚洲美腿欧美偷拍| 在线观看亚洲一区| 视频在线在亚洲| 精品粉嫩aⅴ一区二区三区四区| 国产尤物一区二区| 国产精品福利av| 欧美日韩情趣电影| 蜜桃精品视频在线观看| 亚洲精品亚洲人成人网| 成人性生交大片免费看中文 | 亚洲视频在线一区观看| 欧美美女一区二区在线观看| 国产一区二区视频在线播放| 亚洲欧美偷拍三级| 欧美精品一区二区久久婷婷| 91国产成人在线| 国产大陆a不卡| 蜜桃视频在线观看一区| 一区二区三区四区在线| 国产精品日韩成人| 欧美一区二区成人6969| 在线观看一区二区精品视频| 不卡的电影网站| 国产一区二区三区四| 亚洲狠狠爱一区二区三区| 国产精品久久99| 亚洲国产精品黑人久久久| 欧美精品一区二区三| 欧美日本精品一区二区三区| 91首页免费视频| 不卡电影一区二区三区| 成人一道本在线| 成人av在线一区二区| 国产成人精品综合在线观看 | 欧美视频在线播放| 欧美性色综合网| 欧美日韩精品欧美日韩精品一| 一本到不卡免费一区二区| 色综合久久中文综合久久97| 91香蕉国产在线观看软件| 91色婷婷久久久久合中文| 在线观看免费成人| 欧美丰满少妇xxxxx高潮对白| 欧美一区二区播放| 中文字幕乱码亚洲精品一区| 国产精品久久久久久妇女6080| 日韩理论片在线| 五月激情综合婷婷| 国产精品综合av一区二区国产馆| 不卡免费追剧大全电视剧网站| 91色porny| 91精品国产欧美一区二区18| 久久久噜噜噜久噜久久综合| 亚洲欧洲韩国日本视频| 亚洲第一会所有码转帖| 国产一区久久久| 在线一区二区三区| 精品美女一区二区三区| 亚洲女性喷水在线观看一区| 精品一区二区免费在线观看| k8久久久一区二区三区| 在线播放欧美女士性生活| 国产色91在线| 性久久久久久久| 99天天综合性| 欧美成人精品1314www| 亚洲久草在线视频| 国产精品77777竹菊影视小说| 色吊一区二区三区| 国产欧美日韩视频一区二区| 日本亚洲视频在线| 色婷婷av一区二区三区gif | 亚洲大片一区二区三区| 成人丝袜高跟foot| 欧美大片拔萝卜| 五月天婷婷综合| 欧美在线看片a免费观看| 国产精品国产精品国产专区不蜜| 久久精品国产网站| 欧美一区日韩一区| 亚洲国产综合色| 欧美一a一片一级一片| 一区二区三区精品久久久| 一本色道**综合亚洲精品蜜桃冫| 中日韩av电影| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美妇女性影城| 亚洲成人先锋电影| 在线成人小视频| 奇米精品一区二区三区在线观看 | 国产午夜亚洲精品理论片色戒 | 久久精品国产99| 欧美成人精品福利| 国模无码大尺度一区二区三区| 精品久久久三级丝袜| 精品一区二区三区在线视频| 正在播放一区二区| 国产剧情av麻豆香蕉精品| 国产日韩综合av| 色哦色哦哦色天天综合| 天堂午夜影视日韩欧美一区二区| 欧美精选在线播放| 韩国欧美国产1区| 中文字幕欧美激情| 欧美日韩精品三区| 国产在线精品一区二区夜色| 国产婷婷色一区二区三区| 99视频国产精品| 免费高清视频精品| 国产精品久久三| 欧美疯狂性受xxxxx喷水图片| 国产美女视频一区| 亚洲国产综合91精品麻豆| www国产精品av| 欧美体内she精视频| 国产不卡视频在线观看| 日av在线不卡| 亚洲精品视频一区二区| 精品不卡在线视频|