| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Client |
JFTP |
store |
store() |
Never | Work in Progress |
This method stores a file on the FTP server. It returns true if successful, false otherwise.
boolean store ( $local, $remote )
| $local | string | Path to local file to store on the FTP server |
| $remote | string | FTP path to file to create |
Example
jimport( 'joomla.connector.ftp' ); $ftp = new JFTP( array( 'type' => FTP_BINARY ) ); $ftp->connect( '127.0.0.1' ); $ftp->login( 'testuser', 'testpass' ); if ($ftp->store( 'robots.txt', 'testing/robots.txt' ) ) { echo "File stored successfully!"; } else { echo "File could not be stored!"; }
might produce:
Result
File stored successfully!