====== login ======
{#JAPI Joomla.Framework Client JFTP::login #}
This method logs in to a server once connected.
===== Syntax =====
boolean login ( **$user**, **$pass** )
| **$user** | string | is a string containing the username to use to login to the server. |
| **$pass** | string | is a string containing the password to use to login to the server. |
===== Examples =====
jimport( 'joomla.connector.ftp' );
$ftp = new JFTP( array( 'type' => FTP_BINARY ) );
$ftp->connect( 'ftp.domain.com' );
if ($ftp->login( 'user', 'password' ) ) {
echo "Login successful!";
} else {
echo "Login failed!";
}
might produce:
Login successful!