ftp_get

(PHP 3 >= 3.0.13, PHP 4, PHP 5)

ftp_get -- 眖 FTP 狝竟更郎

弧

bool ftp_get ( resource ftp_stream, string local_file, string remote_file, int mode [, int resumepos] )

ftp_get() ㄧ计ノㄓ更 FTP 狝竟パ remote_file 把计疭郎纗パ把计 local_file 疭セ郎肚块家Α把计 mode  (ゅ家Α) FTP_ASCII ┪ (秈家Α) FTP_BINARY いㄤい

猔: 把计 resumepos 度続ノ PHP 4.3.0 セ.

璝狦Θ玥 TRUEア毖玥 FALSE

ㄒ 1. ftp_get() ㄒ

<?php
// define some variables
$local_file 'local.zip';
$server_file 'server.zip';
// connect to the FTP server
$conn_id ftp_connect($ftp_server);
$login_result ftp_login($conn_id$ftp_user_name$ftp_user_pass);
// try to download
if (ftp_get($conn_id$local_file$server_fileFTP_BINARY)) {
    echo 
"Successfully written to $local_file\n";
} else {
    echo 
"There was a problem\n";
}
// close the connection
ftp_close($conn_id);
?>

把ǎ ftp_fget()ftp_nb_get()ftp_nb_fget()