PHP ftp_nb_continue() Function
Example
Download a file from the server, continue downloading (non-blocking) while doing something else:
<?php
// initiate download
$d = ftp_nb_get($ftp_conn, "local.txt", "server.txt", FTP_BINARY)
while ($d == FTP_MOREDATA)
{
// do whatever you want
// continue downloading
$d = ftp_nb_continue($ftp_conn);
}
if ($d != FTP_FINISHED)
{
echo "Error downloading file.";
exit(1);
}
?>
Definition and Usage
The ftp_nb_continue() function continues to receive/send a file to the FTP server.
Syntax
ftp_nb_continue(ftp_conn);
Parameter Values
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
Technical Details
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
❮ PHP FTP Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.