public function login($username = 'anonymous', $password = '')
    {
        $result = @ftp_login($this->connection, $username, $password);

        if ($result === false) {
            throw new Exception('Login incorrect');
        } else {
            // set passive mode
            if (!is_null($this->passive)) {
                $this->passive($this->passive);
            }

            return $this;
        }
    }
public function login($username = 'anonymous', $password = '')
    {
        $result = @ftp_login($this->connection, $username, $password);

        if ($result === false) {
            throw new Exception('Login incorrect');
        } else {
            // set passive mode
            if (!is_null($this->passive)) {
                $this->passive($this->passive);
            }

            return $this;
        }
    }
public function login ( $ username = 'anonymous' , $ password = '' ) { $ result = @ ftp_login ( $ this -> connection , $ username , $ password ) ; if ( $ result === false ) { throw new Exception ( 'Login incorrect' ) ; } else { // set passive mode if ( ! is_null ( $ this -> passive ) ) { $ this -> passive ( $ this -> passive ) ; } return $ this ; } }
Logins to FTP Server

@param string $username
@param string $password

@return FTPClient
Logins to FTP Server