| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Client |
JFTP |
chdir |
chdir() |
Never | Work in Progress |
This is a method to change the current working directory on the FTP server.
boolean chdir ( $path )
| $path | string | is a string containing the path to change to on the 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->chdir( 'test' ) ) { echo "Directory change successful!"; } else { echo "Directory change failed!"; }
might produce:
Result
Directory change successful!