Table of Contents

reinit

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Client Class JFTP Method reinit Reference reinit() Never Work in Progress

This method reinitializes the server. This method would be used if login had to be done again. NOTE: This command not available on all servers. The function returns true if successful, false otherwise.

Syntax

boolean reinit ()

Examples

Example

jimport( 'joomla.connector.ftp' );

$ftp = new JFTP( array( 'type' => FTP_BINARY ) );
$ftp->connect( '127.0.0.1' );
$ftp->login( 'testuser', 'testpass' );

if ($ftp->reinit() ) {
    echo "Reinitialization successful!";
} else {
    echo "Reinitialization failed!";
}

might produce:

Result

Reinitialization successful!

TODO: Please test this example... I think my server performed the operation correctly, it returned a 230, but I don’t think that the response was correctly recognized. It errored and killed my script.