PHP ftp_nb_continue()関数
例
サーバーからファイルをダウンロードし、他のことをしながらダウンロードを続行します(ブロックなし)。
<?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);
}
?>
定義と使用法
ftp_nb_continue()関数は、FTPサーバーへのファイルの送受信を継続します。
構文
ftp_nb_continue(ftp_conn);
パラメータ値
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
技術的な詳細
戻り値: | 次のいずれかの値:
|
---|---|
PHPバージョン: | 4.3+ |
❮PHPFTPリファレンス