(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
ftp_nb_continue — 连续获取/发送文件(以不分块的方式 non-blocking)
$ftp_stream): int以不分块的方式,连续获取/发送文件。
ftp_streamFTP 连接句柄。
返回 FTP_FAILED 或 FTP_FINISHED
或 FTP_MOREDATA.
示例 #1 ftp_nb_continue() 示例
<?php
// Initiate the download
$ret = ftp_nb_get($my_connection, "test", "README", FTP_BINARY);
while ($ret == FTP_MOREDATA) {
// Continue downloading...
$ret = ftp_nb_continue($my_connection);
}
if ($ret != FTP_FINISHED) {
echo "There was an error downloading the file...";
exit(1);
}
?>