obj := CreateObject("FTP");
obj.host := "ftp.tinysoft.com.cn";
obj.port := 20;
obj.username := username;
obj.password := password;
//连接FTP服务器
obj.connect();
//登录
obj.Login();
//构造TStream对象
filepath := "D:\\test\\Test.txt";
st := new TMemoryStream();
st.LoadFromFile("",filepath);
obj.Put(st,"put.txt",false);
//若上传成功,可在服务器中查看或使用FAQ:
Get 下载后在本机查看