apache配置如下: ScriptAlias /cgi-bin/ "C:/Apache2/cgi-bin/" # # "C:/Apache2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "C:/Apache2/cgi-bin" > AllowOverride None Options None Order allow,deny Allow from all </Directory > test.c代码如下: #include <stdio.h > #include <stdlib.h > int main(void) { char* query; printf("%s%c%c/n","Content-Type:text/html;charset=iso-8859-1",13,10); printf(" <title >Search Result </title >/n"); printf(" <H3 >Search Result </H3 >/n"); query = getenv("QUERY_STRING"); // Note 1: other functions to truncate the query string // Note 2: other functions to search for the related documents // Now, if you find the word and want to display on user "s browser, do printf("/n <p > word %s is found/n", query); } 我用MinGW编译程序,把程序放到了 C:/Apache2/cgi-bin/test.exe 但用IE打开:http://localhost/cgi-bin/test.exe 确要我下载.问题出在哪呢? 请各位高手帮忙. |
20 |
width="100%" scrolling="no" height="0" frameborder="0" src="http://topic.csdn.net/u/AD/Topic_Zone.aspx" marginheight="0" marginwidth="0" id="Topic_Zone" style="height: 0pt;">
|
|
|
|
|
|
|
|
|
|
|
|