ftp_put
Upload the file to the server.
ftp_put()
function uploads the file to the server.
Return true if successful, and false if failed.
This example copies the text from "source.txt" to "target.txt":
<?php $conn = ftp_connect ( "ftp.testftp.com" ) or die ( "Could not connect" ) ; ftp_login ( $conn , "admin" , "ert456" ) ; echo ftp_put ( $conn , "target.txt" , "source.txt" , FTP_ASCII ) ; ftp_close ( $conn ) ; ?>
Output:
1
ftp_put ( ftp_connection , remote , local , mode , resume )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
remote | Required. The file name uploaded to the server. |
local | Required. Specifies the path to the local file to be uploaded. |
mode |
Required. Specify transmission mode. Possible values are:
|
resume | Required. Specifies where to start copying in the local file. The default is 0. |