API16

JFTP/reinit

From Joomla! Documentation

< API16:JFTP
Revision as of 17:39, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Method to reinitialise the server, ie. need to login again <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description:JFTP/reinit|Edit Descrip...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

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

[Edit Descripton]

Template:Description:JFTP/reinit

Syntax[edit]

reinit()


Returns[edit]

boolean True if successful

Defined in[edit]

libraries/joomla/client/ftp.php

Importing[edit]

jimport( 'joomla.client.ftp' );

Source Body[edit]

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;
}

[Edit See Also] Template:SeeAlso:JFTP/reinit

Examples[edit]

<CodeExamplesForm />