with idftp1 do try Username:=' '; Password:=' '; Host:=' '; if not Connected then begin connect; end; //ChangeDir('F:\CompanyData'); // showmessage(RetrieveCurrentDir);//获取连接后服务器上的路径 except showmessage('程序异常退出'); end; if IdFtp1.Connected then begin idftp1.Put('C:\1.bmp',idftp1.RetrieveCurrentDir+'\3.jpg',true); //idftp1.get(idftp1.RetrieveCurrentDir+'\error.jsp','F:\CompanyData\1.jsp',true); //idftp1.get(idftp1.RetrieveCurrentDir+'\cas_his.dat','F:\CompanyData\cas_his.dat',true); idftp1.Disconnect; close; end else begin showmessage('连接不成功') end; 这是我的代码,有没有什么地方有错误
Indy有源码的,自己看就是了嘛
try
Username:=' ';
Password:=' ';
Host:=' ';
if not Connected then
begin
connect;
end;
//ChangeDir('F:\CompanyData');
// showmessage(RetrieveCurrentDir);//获取连接后服务器上的路径
except
showmessage('程序异常退出');
end;
if IdFtp1.Connected then
begin idftp1.Put('C:\1.bmp',idftp1.RetrieveCurrentDir+'\3.jpg',true);
//idftp1.get(idftp1.RetrieveCurrentDir+'\error.jsp','F:\CompanyData\1.jsp',true);
//idftp1.get(idftp1.RetrieveCurrentDir+'\cas_his.dat','F:\CompanyData\cas_his.dat',true);
idftp1.Disconnect;
close;
end
else
begin
showmessage('连接不成功') end;
这是我的代码,有没有什么地方有错误