A
andyfing
Unregistered / Unconfirmed
GUEST, unregistred user!
错误如下
CGI程序运行有问题! Error Code:500
提示:如果程序用Perl编写,请不要使用require语句。各个程序文件之间不能相互调用。
出错参考信息:
[Sat Mar 24 19:54:05 2001] [error] Missing right bracket at cgi-bin/junjie.cgi line 1, at end of line
syntax error at cgi-bin/junjie.cgi line 1, at EOF
呵呵,就是网上到处都有的那个留言本。
如下:两个WebActionItem 程序,{$R *.DFM}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var html:string;
begin
html:='';
html:=html+'<html><head><title>会员注册</title></head><center>';
html:=html+'<H2>会员注册</H2></center>';
html:=html+'<body background="" bgcolor="#fffff"><td></td>';
html:=html+'<form action="http://andyfing.51.net/cgi-bin/junjie.cgi/info" method="post" id="form1" name="form1" style="FONT-SIZE: larger">';
html:=html+'<p>姓名:<input size="12" maxlength="10" name="UserName"></p>';
html:=html+'<p>性别:<input type="radio" name="Sex" value="Man" checked>男';
html:=html+'<input type="radio" name="Sex" value="Woman">女</p>';
html:=html+'<p>年龄:<input size="5" maxlength="3" name="Age"></p>' ;
html:=html+'<p>所在城市:<input size="20" maxlength="16" name="City"></p>' ;
html:=html+'<p>Email:<input size="24" maxlength="30" name="Email"></p>';
html:=html+'<p>留言:<textarea name="Textarea" rows="5" cols="30"></textarea></p>';
html:=html+'<center><input type="submit" Name="submit" value=" 提 交 ">';
html:=html+'<input type="reset" value=" 取 消">';
html:=html+'</form></center>';
html:=html+'</BODY></html>';
Response.Content :=html;
end;
procedure TWebModule1.WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
html:string;
Output: TextFile;
Counts,line:integer;
begin
Assignfile(Output, 'List.Txt');{如果没有list.txt文件会报错,须先手工创建。}
Append(output);
for counts:=0 to Request.ContentFields.Count-2 do
begin
if counts< Request.ContentFields.Count-2 then
begin
Write(Output, Request.ContentFields.Strings[counts]);
for line:=0 to 20-length(Request.ContentFields.Strings[counts]) do
begin
Write(Output,' ');
end;
end
else
begin
Write(Output, Request.ContentFields.Strings[counts]);
Writeln(Output,' ');
end ;
end;
CloseFile(output);
html:='';
html:=html+'<html><head><title>Thank You!</title></head><body>';
html:=html+'<center><P><H2>'+Request.ContentFields.Values['UserName'];
html:=html+'您好!您已注册成功!</H2></P>';
html:=html+'<A href="http://andyfing.51.net/cgi-bin/junjie.cgi">点击这里返回</A>';
html:=html+'</center></body></html>';
Response.Content :=html;
end;
end.
程序本身没错误,WIN98、PWS 调试完全成功。
高手帮帮忙呀,不要让我失去学dephi的信心呀!
CGI程序运行有问题! Error Code:500
提示:如果程序用Perl编写,请不要使用require语句。各个程序文件之间不能相互调用。
出错参考信息:
[Sat Mar 24 19:54:05 2001] [error] Missing right bracket at cgi-bin/junjie.cgi line 1, at end of line
syntax error at cgi-bin/junjie.cgi line 1, at EOF
呵呵,就是网上到处都有的那个留言本。
如下:两个WebActionItem 程序,{$R *.DFM}
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var html:string;
begin
html:='';
html:=html+'<html><head><title>会员注册</title></head><center>';
html:=html+'<H2>会员注册</H2></center>';
html:=html+'<body background="" bgcolor="#fffff"><td></td>';
html:=html+'<form action="http://andyfing.51.net/cgi-bin/junjie.cgi/info" method="post" id="form1" name="form1" style="FONT-SIZE: larger">';
html:=html+'<p>姓名:<input size="12" maxlength="10" name="UserName"></p>';
html:=html+'<p>性别:<input type="radio" name="Sex" value="Man" checked>男';
html:=html+'<input type="radio" name="Sex" value="Woman">女</p>';
html:=html+'<p>年龄:<input size="5" maxlength="3" name="Age"></p>' ;
html:=html+'<p>所在城市:<input size="20" maxlength="16" name="City"></p>' ;
html:=html+'<p>Email:<input size="24" maxlength="30" name="Email"></p>';
html:=html+'<p>留言:<textarea name="Textarea" rows="5" cols="30"></textarea></p>';
html:=html+'<center><input type="submit" Name="submit" value=" 提 交 ">';
html:=html+'<input type="reset" value=" 取 消">';
html:=html+'</form></center>';
html:=html+'</BODY></html>';
Response.Content :=html;
end;
procedure TWebModule1.WebModule1WebActionItem2Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
html:string;
Output: TextFile;
Counts,line:integer;
begin
Assignfile(Output, 'List.Txt');{如果没有list.txt文件会报错,须先手工创建。}
Append(output);
for counts:=0 to Request.ContentFields.Count-2 do
begin
if counts< Request.ContentFields.Count-2 then
begin
Write(Output, Request.ContentFields.Strings[counts]);
for line:=0 to 20-length(Request.ContentFields.Strings[counts]) do
begin
Write(Output,' ');
end;
end
else
begin
Write(Output, Request.ContentFields.Strings[counts]);
Writeln(Output,' ');
end ;
end;
CloseFile(output);
html:='';
html:=html+'<html><head><title>Thank You!</title></head><body>';
html:=html+'<center><P><H2>'+Request.ContentFields.Values['UserName'];
html:=html+'您好!您已注册成功!</H2></P>';
html:=html+'<A href="http://andyfing.51.net/cgi-bin/junjie.cgi">点击这里返回</A>';
html:=html+'</center></body></html>';
Response.Content :=html;
end;
end.
程序本身没错误,WIN98、PWS 调试完全成功。
高手帮帮忙呀,不要让我失去学dephi的信心呀!