以前没有这么多脚本语言的时候应该很流行.
安装apache
启用模块 userdir, 就是每个用户目录一个public_html
sudo vim /etc/apache2/mods-enabled/userdir.conf
/*****************************************************************
* C Programming in Linux (c) David Haskins 2008
* chapter1_3.c *
*****************************************************************/
#include
int main(int argc, char *argv[])
{
int i=0;
printf("Content-type:text/plain\n\n");
printf("Hello, you are still learning C!!\n");
printf("Number of arguments to the main function:%d\n", argc);
for(i=0;i
{
printf("argument number %d is %s\n", i, argv[i]);
}
return 0;
}
启用对每个用户都有效的cgi目录
Options ExecCGI
SetHandler cgi-script
0 comments:
Post a Comment