(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_file, FTP_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()