DELPHI编写的FTP地址函数计算机二级考试

文章作者 100test 发表时间 2009:06:15 07:14:02
来源 100Test.Com百考试题网


  编辑特别推荐:

  全国计算机等级考试(等考)指定教材

  全国计算机等级考试学习视频

  全国计算机等级考试网上辅导招生

  全国计算机等级考试时间及科目预告

  百考试题教育全国计算机等级考试在线测试平台

  全国计算机等级考试资料下载

  全国计算机等级考试论坛

  计算机等级考试四级应用题解析汇总

  2009年下半年全国计算机二级考试时间是2009年9月19日至23日。2009年下半年全国计算机二级考试报名时间会在考前两个月开始报名!更多优质资料尽在百考试题论坛 百考试题在线题库

  procedure TForm1.FTPAnalysis(S:string.var UserName,Password,IP,FileName:String.var DirList:TStringList).
  var
  i,j:integer.
  strAuthorization,strAddr,strDirFile:string.//授权信息
  begin
  UserName:= ’anonymous’.
  Password:= ’[email protected]’.
  IP := ’’.
  strAddr := Copy(S,7,length(S)-6).//取得ftp://之后的部分
  //S 格式必须是类似ftp://rec:[email protected]/20050418/abcdef.vox,或ftp://192.168.76.11/......
  i := Pos(’@’,S).
  if(i>.0) then
  begin
  strAuthorization := Copy(S,7,i-7). //只取帐号密码字段
  j:=Pos(’:’,strAuthorization).
  if(j<.1)then
  exit.
  UserName := Copy(strAuthorization,1,j-1).
  PassWord := Copy(strAuthorization,j 1,length(strAuthorization)-j).
  end.
  i := Pos(’@’,strAddr).
  j:=Pos(’/’,strAddr).
  if(j>.0) then
  IP := Copy(strAddr,i 1,j-i-1).//获得IP地址
  strDirFile := Copy(strAddr,j 1,length(strAddr)-j).
  DirList.Delimiter := ’/’.
  DirList.DelimitedText := strDirFile.//获得目录列表
  FileName := DirList[DirList.count-1].//最后部分为文件名
  DirList.Delete(DirList.Count-1).
  end.

  2009年9月全国计算机等级考试时间及科目预告

  2009年NCRE考试有新变化

  2009年全国计算机等级考试-大纲

  全国计算机等级考试历年真题及答案

  2009年上半年全国计算机等级考试试题及答案



相关文章


计算机二级DELPHI技巧:Delphi操作Excel计算机二级考试
delphi实现批量缩略图生成工具计算机二级考试
DELPHI编写的FTP地址函数计算机二级考试
Delphi标识号的另类用法计算机二级考试
Self.AutoPostBackControl:=nil计算机二级考试
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛