Support Joomla!

references:joomla.framework:client:jftp-setoptions

Table of Contents

setOptions

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

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.

Syntax

boolean setOptions ( $options )

$options array is an associative array of options to set.

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->setOptions( array( 'type' => FTP_ASCII ) ) ) {
    echo "Options set successfully!";
} else {
    echo "Options could not be set!";
}

might produce:

Result

Options set successfully!
 
references/joomla.framework/client/jftp-setoptions.txt (530 views) · Last modified: 2007/08/15 15:13