一聚教程网:一个值得你收藏的教程网站

ftp类(myftp.php)

mg电子:  而在很多业内人士眼中,我国发展人工智能也有着不少优势。

时间:2008-01-12 00:00:00 编辑:简简单单 来源:转载

<?php
class myftp {
    var $connector;
    var $getback;
    
    function connect($ftp_server, $uname, $passwd){
    // Baut grundlegende FTP Connection auf
        $this->connector = @ftp_connect($ftp_server);
        $this->login_result = @ftp_login($this->connector, "$uname", "$passwd");
        if ((!$this->connector) || (!$this->login_result))
        {
           echo "FTP connection has failed! ";
           echo "Attempted to connect to $ftp_server for user $uname ";
           die;
       } else {
           echo "Connected to $ftp_server, for user $uname ";
       }
    }
    function lastmodtime($value){
        $getback = ftp_mdtm ($this->connector,$value);
        return $getback;
    }
    function changedir($targetdir){
        $getback = ftp_chdir($this->connector, $targetdir);
        return $getback;
    }
    function getdir(){    
        $getback = ftp_pwd($this->connector);

文章评论

热门栏目

合作: 赌博网 澳门赌球 mg电子