ftp_get
Download the file from the FTP server.
ftp_get()
function downloads a file from the FTP 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_get ( $conn , "target.txt" , "source.txt" , FTP_ASCII ) ; ftp_close ( $conn ) ; ?>
Output:
1
ftp_get ( ftp_connection , local , remote , mode , resume )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
local | Required. Specify local documents. |
remote | Required. Specifies the path to the file from which it is copied. |
mode |
Required. Specify transmission mode. Possible values are:
|
resume | Required. Specifies where to start copying in remote files. The default is 0. |
Parameter resume is only applicable to PHP 4.3.0 or above