====== chdir ======
{#JAPI Joomla.Framework Client JFTP::chdir #}
This is a method to change the current working directory on the FTP server.
===== Syntax =====
boolean chdir ( **$path** )
| **$path** | string | is a string containing the path to change to on the server. |
===== Examples =====
jimport( 'joomla.connector.ftp' );
$ftp = new JFTP( array( 'type' => FTP_BINARY ) );
$ftp->connect( '127.0.0.1' );
$ftp->login( 'testuser', 'testpass' );
if ($ftp->chdir( 'test' ) ) {
echo "Directory change successful!";
} else {
echo "Directory change failed!";
}
might produce:
Directory change successful!