<?php
// 开始
$ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY,
filesize("test"));
// 或: $ret = ftp_nb_get ($my_connection, "test", "README",
// FTP_BINARY, FTP_AUTORESUME);
while ($ret == FTP_MOREDATA) {
// 可以插入其它代码
echo ".";
// 继续传送...
$ret = ftp_nb_continue ($my_connection);
}
if ($ret != FTP_FINISHED) {
echo "下载出错...";
exit(1);
}
?>