ftp_nb_continue

(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)

ftp_nb_continue连续获取/发送文件(以不分块的方式 non-blocking)

说明

ftp_nb_continue(FTP\Connection $ftp): int

以不分块的方式,连续获取/发送文件。

参数

ftp

FTP\Connection 实例。

返回值

返回 FTP_FAILEDFTP_FINISHEDFTP_MOREDATA

更新日志

版本 说明
8.1.0 现在 ftp 参数接受 FTP\Connection 实例,之前接受 resource

示例

示例 #1 ftp_nb_continue() 示例

<?php

// Initiate the download
$ret = ftp_nb_get($ftp, "test", "README", FTP_BINARY);
while (
$ret == FTP_MOREDATA) {

// Continue downloading...
$ret = ftp_nb_continue($ftp);
}
if (
$ret != FTP_FINISHED) {
echo
"There was an error downloading the file...";
exit(
1);
}
?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top