This tutorial is about a simple file upload and download function using the php ftp function. Okay, let’s take a look at a simple example tutorial.
This tutorial is about a simple file upload and download function using the php ftp function. Okay, let’s take a look at a simple example tutorial.
// Start
$ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY,
filesize("test"));
// Or: $ret = ftp_nb_get ($my_connection, "test", "README",
// FTP_BINARY, FTP_AUTORESUME);
while ($ret == FTP_MOREDATA) {
// Other codes can be inserted
echo ".";
// Continue sending...
$ret = ftp_nb_continue ($my_connection);
}
if ($ret != FTP_FINISHED) {
echo "Download error...";
exit(1);
}
?>
Please indicate when reprinting: www.111cn.cn/phper/php.html