由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - 请教一个cgi的newbie问题
相关主题
apache web server under NT4.0?Re: **********Help Needed! 怎样在最短的时间内学会CGI??急!!!*********
remote API 's output?[转载] 呵呵。询问一把高人
perl cgis: how to send back frame webpage?how to add cgi module in apache?
【求指点】导师问我怎么在网页中加个password这段程序怎么老出错?
我是怎样维护和制作这个站点的[转载]\\\\\\\\\\\\\\\\A question about CGI//////////////
Re: [转载] webmonkey一个关于CGI程序的问题
Help me with a stupid question.再请教一个APACHE中设CGI的问题
请问如何让IE提示将CGI返回的结果保存为文件?[转载] How many version of Perl/CGI are there?
相关话题的讨论汇总
话题: cgi话题: addr话题: record话题: remote话题: print
进入BuildingWeb版参与讨论
1 (共1页)
t*****t
发帖数: 72
1
有如下一段cgi程序:
################################
#!/usr/bin/perl -wT
use strict;
use CGI;
my $q = new CGI;
my $remote_addr = $q->remote_addr;
print $q->header(),$q->start_html("test");
print "IP:$remote_addr\n";
print $q->end_html;
open (RECORD,">> /home/www/cgi-bin/log.txt") or die "can't open file:$!";
print RECORD "IP:$remote_addr\n";
close(RECORD);
##################################################################
从www浏览器上直接运行这个.cgi文件(http://address/cgi-bin/a.cgi
,可以在网页上显示结果,但是无法生成 log.txt 文件,把
M******t
发帖数: 309
2
create the log file and make it world writable...
Consult your System Admin, ask if they can provide a secured
solution other than this. for example adding Apache user nobody into some gr
oup...

【在 t*****t 的大作中提到】
: 有如下一段cgi程序:
: ################################
: #!/usr/bin/perl -wT
: use strict;
: use CGI;
: my $q = new CGI;
: my $remote_addr = $q->remote_addr;
: print $q->header(),$q->start_html("test");
: print "IP:$remote_addr\n";
: print $q->end_html;

t*****t
发帖数: 72
3
thanks, the first one works. BTW. if I have the root of the server
how I can change the apache configuration file. Or is there any
webpages that can point me to the solution. Many thanks..

【在 M******t 的大作中提到】
: create the log file and make it world writable...
: Consult your System Admin, ask if they can provide a secured
: solution other than this. for example adding Apache user nobody into some gr
: oup...

1 (共1页)
进入BuildingWeb版参与讨论
相关主题
[转载] How many version of Perl/CGI are there?我是怎样维护和制作这个站点的[转载]
我在mit bbs 的邮箱出了点问题Re: [转载] webmonkey
为啥"no-cache"对某些版本的IE不起作用?Help me with a stupid question.
问几个关于网页和HTML的问题请问如何让IE提示将CGI返回的结果保存为文件?
apache web server under NT4.0?Re: **********Help Needed! 怎样在最短的时间内学会CGI??急!!!*********
remote API 's output?[转载] 呵呵。询问一把高人
perl cgis: how to send back frame webpage?how to add cgi module in apache?
【求指点】导师问我怎么在网页中加个password这段程序怎么老出错?
相关话题的讨论汇总
话题: cgi话题: addr话题: record话题: remote话题: print