$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

ftp_nb_put($conn,"target.txt","source.txt",FTP_ASCII);

ftp_close($conn);
PHP FTP 参考手册 完整的 PHP FTP 参考手册