= 4.3.0, PHP 5, PHP 7, PHP 8)ftp_nb_continue — 連續(xù)獲取/發(fā)送文件(以不分塊的方式 non-blocking)說(shuō)明ftp_nb_continue(resource $ftp_stream): int以不分塊的">

ftp_nb_continue

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

ftp_nb_continue連續(xù)獲取/發(fā)送文件(以不分塊的方式 non-blocking)

說(shuō)明

ftp_nb_continue(resource $ftp_stream): int

以不分塊的方式,連續(xù)獲取/發(fā)送文件。

參數(shù)

ftp_stream

FTP 連接句柄。

返回值

返回 FTP_FAILEDFTP_FINISHEDFTP_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);
}
?>