| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Client |
JFTP |
create |
create() |
Never | Work in Progress |
Method to create an empty file on the FTP server.
boolean create ( $path )
| $path | string | is a string containing the path to the local file to store on the FTP 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->create( 'robots.txt' ) ) { echo "Create successful!"; } else { echo "Create failed!"; }
might produce:
Result
Create successful!