为什么我用idhttp控件 post数据的时候,数据能够提交,但是老是出现"302 Object moved",谁有同样的经历,请进来!!(我这个问题提前了好几

  • 主题发起人 主题发起人 lpzst002
  • 开始时间 开始时间
L

lpzst002

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么我用idhttp控件 post数据的时候,数据能够提交,但是老是出现"302 Object moved",谁有同样的经历,请进来!!(我这个问题提前了好几次怎么没人回答啊,高手到哪去了!!!) (50分)<br /> If Trim(panel113.DBedit.Text)='' then Plong:='0' Else Plong:=panel113.DBedit.Text;
If Trim(panel114.DBedit.Text)='' then pwidth:='0' Else pwidth:=panel114.DBedit.Text;
if Trim(panel115.DBedit.Text)='' then Pheight:='0' Else Pheight:=panel115.DBedit.Text;
If Trim(panel123.DBedit.Text)='' then PPackLong:='0' Else PPackLong:=panel123.DBedit.Text;
If Trim(panel124.DBedit.Text)='' then PPackWidth:='0' Else PPackWidth:=panel124.DBedit.Text;
If Trim(panel115.DBedit.Text)='' then PPackHeight:='0' Else PPackHeight:=panel115.DBedit.Text;
If Trim(panel121.DBedit.Text)='' then PInnerBoxAmount:='0' Else PInnerBoxAmount:=panel121.DBedit.Text;
If Trim(panel122.DBedit.Text)='' then PInnerBoxContent:='0' Else PInnerBoxContent:=panel122.DBedit.Text;
If Trim(panel127.DBedit.Text)='' then PGrossWeight:='0' Else PGrossWeight:=panel127.DBedit.Text;
If Trim(panel126.DBedit.Text)='' then PNetWeight:='0' Else PNetWeight:=panel126.DBedit.Text;
HttpStr:='Pname='+Panel18.DBedit.Text+'&amp;Pname_en=--'+'&amp;PNo='+panel110.DBedit.Text;
HttpStr:=HttpStr+'&amp;Ptype='+panel15.DBedit.Text+'&amp;PtypeEN=toy&amp;PPackStyle='+panel111.DBedit.Text;
HttpStr:=HttpStr+'&amp;PPackStyleEN='+panel112.DBedit.Text+'&amp;PUnits='+panel117.DBedit.Text;
HttpStr:=HttpStr+'&amp;PUnitsEN=--&amp;Pprice=0&amp;Plong='+Plong;
HttpStr:=HttpStr+'&amp;Pwidth='+pwidth+'&amp;Pheight='+Pheight;
HttpStr:=HttpStr+'&amp;PPackLong='+PPackLong+'&amp;PPackWidth='+PPackWidth;
HttpStr:=HttpStr+'&amp;PPackHeight='+PPackHeight+'&amp;PInnerBoxAmount='+PInnerBoxAmount;
HttpStr:=HttpStr+'&amp;PInnerBoxContent='+PInnerBoxContent+'&amp;PPackUnits='+DBcombobox1.Text;
HttpStr:=HttpStr+'&amp;PGrossWeight='+PGrossWeight+'&amp;PNetWeight='+PNetWeight;
HttpStr:=HttpStr+'&amp;Pinfo='+stringreplace(PanelMemo1.DBMemo.Text,chr(13)+chr(10),'<br>',[rfReplaceAll]);
Memo1.Text:=Httpstr ;
Response := TStringStream.Create('');
Try
Http.Post('http://www.sjrj.com/showpro/admin/NewProduct2.asp',Memo1.Lines,Response);
Finally
Memo1.Text:=Response.DataString;
End;

数据能够提交,在网上也看到数据了,就是老是出现 "302 Object moved"的错误,这是为什么啊?????[:(!][:(!]
 
提交的地址使用了response.redirect(新的页面地址)方法。
这是ASP转移网站指向的方法,就是当访问这个网页的时候,将地址转移到新的网页地址。
 
谢谢,我试试看把他去掉,会不会产生错误!!!
 
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
937
SUNSTONE的Delphi笔记
S
后退
顶部