| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Client |
JFTP |
get |
get() |
Never | Work in Progress |
This method gets a file from the FTP server and saves it to a local file.
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. |
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!