X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP ftp_nb_continue() Function

PHP FTP Reference PHP FTP Reference

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_connection);

Parameter Description
ftp_connection Required. Specifies the FTP connection to use

Technical Details

Return Value: This function returns one of the following values:
  • FTP_FAILED (send/receive failed)
  • FTP_FINISHED (send/receive completed)
  • FTP_MOREDATA (send/receive in progress)
PHP Version: 4.3+


PHP FTP Reference PHP FTP Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook