首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

PHP写的FTP类

整理日期:2007年03月02日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-03/1172834312.html
  function getdir(){
    $getback = ftp_pwd($this->connector);
    return $getback;
  }

  function get_file_list($directory){
    $getback = ftp_nlist($this->connector, $directory);
    return $getback;
  }

  function get_file($file_to_get, $mode, $mode2){
    $realfile = basename($file_to_get);
    $filename = $realfile;

    $checkdir = @$this->changedir($realfile);
    if ($checkdir == TRUE){
      ftp_cdup($this->connector);
      echo "n[DIR] $realfile";
    }else{
      echo "..... ". $realfile ."n";
      $getback = ftp_get($this->connector, $filename, $realfile, $mode);
      if ($mode2){
        $delstatus = ftp_delete($this->connector, $file_to_get);
        if ($delstatus == TRUE){
          echo "File $realfile on $host deleted n";
        }
      }
    }
    return $getback;
  }

Tags:
PHP写的FTP类
'http://www.etoow.com/html/2007-03/1172834312.html
1
 
2
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved