Copy CodeThe code is as follows:
Defining variables
$local _file = ' local.zip ';
$server _file = ' server.zip ';
Connecting to an FTP server
$conn _id = ftp_connect ($ftp _server);
Verifying the logon server
$login _result = Ftp_login ($conn _id, $ftp _user_name, $ftp _user_pass);
Download file
if (Ftp_get ($conn _id, $local _file, $server _file, ftp_binary)) {
echo "Download $local _file file Success n";
} else {
echo "Download failed n";
}
Close FTP connection
Ftp_close ($conn _id);
?>
ftp_connect-to create a new FTP connection
ftp_login-Log on to the FTP server
ftp_get-downloading a file from the FTP server
http://www.bkjia.com/PHPjc/322017.html www.bkjia.com true http://www.bkjia.com/PHPjc/322017.html techarticle Copy the code as follows: PHP//define variable $local _file = ' local.zip '; $server _file = ' server.zip ';//Connect FTP server $conn _id = Ftp_connect ($ft P_server); Verify sign-in service ...