API16

API16:JFTP/reinit

From Joomla! Documentation

Revision as of 01:38, 25 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Method to reinitialise the server, ie. need to login again


<! removed transcluded page call, red link never existed >

Syntax

reinit()


Returns

boolean True if successful

Defined in

libraries/joomla/client/ftp.php

Importing

jimport( 'joomla.client.ftp' );

Source Body

function reinit() {

        // If native FTP support is enabled lets use it...
        if (FTP_NATIVE) {
                if (@ftp_site($this->_conn, 'REIN') === false) {
                        JError::raiseWarning('35', 'JFTP::reinit: Bad response');
                        return false;
                }
                return true;
        }

        // Send reinitialise command to the server
        if (!$this->_putCmd('REIN', 220)) {
                JError::raiseWarning('35', 'JFTP::reinit: Bad response', 'Server response: '.$this->_response.' [Expected: 220]');
                return false;
        }

        return true;
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples