references:joomla.framework:client:jftp-setoptionsTable of Contents
setOptions
This method sets options for the FTP client. Currently the only recognized option is ‘type’ which corresponds to the data transfer type. The class defines three type constants: FTP_AUTOASCII, FTP_BINARY and FTP_ASCII. This method returns true if successful, false otherwise. Syntaxboolean setOptions ( $options )
ExamplesExample jimport( 'joomla.connector.ftp' ); $ftp = new JFTP( array( 'type' => FTP_BINARY ) ); $ftp->connect( '127.0.0.1' ); $ftp->login( 'testuser', 'testpass' ); if ($ftp->setOptions( array( 'type' => FTP_ASCII ) ) ) { echo "Options set successfully!"; } else { echo "Options could not be set!"; } might produce: Result Options set successfully! |


