Support Joomla!

references:joomla.framework:client:jftp-get

Table of Contents

get

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

This method gets a file from the FTP server and saves it to a local file.

Syntax

boolean get ( $local, $remote )

$local string is a string containing the path to the local file to save the remote file as.
$remote string is a string containing the path to the remote file to get on the FTP server.

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->get( JPATH_ROOT . '/john3.mp3', 'john3.mp3' ) ) {
    echo "Get successful!";
} else {
    echo "Get failed!";
}

might produce:

Result

Get successful!
 
references/joomla.framework/client/jftp-get.txt (485 views) · Last modified: 2007/08/15 15:13