====== create ======
{#JAPI Joomla.Framework Client JFTP::create #}
Method to create an empty file on the FTP server.
===== Syntax =====
boolean create ( **$path** )
| **$path** | string | is a string containing the path to the local file to store on the FTP 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->create( 'robots.txt' ) ) {
echo "Create successful!";
} else {
echo "Create failed!";
}
might produce:
Create successful!