ftp_ssl_connect example



    /** * Connects filesystem. * * @since 2.5.0 * * @return bool True on success, false on failure. */
    public function connect() {
        if ( isset( $this->options['ssl'] ) && $this->options['ssl'] && function_exists( 'ftp_ssl_connect' ) ) {
            $this->link = @ftp_ssl_connect( $this->options['hostname']$this->options['port'], FS_CONNECT_TIMEOUT );
        } else {
            $this->link = @ftp_connect( $this->options['hostname']$this->options['port'], FS_CONNECT_TIMEOUT );
        }

        if ( ! $this->link ) {
            $this->errors->add(
                'connect',
                sprintf(
                    /* translators: %s: hostname:port */
                    __( 'Failed to connect to FTP Server %s' ),
                    $this->options['hostname'] . ':' . $this->options['port']
                )
Home | Imprint | This part of the site doesn't use cookies.