Home > Backend Development > PHP Tutorial > php ftp download file_PHP tutorial

php ftp download file_PHP tutorial

WBOY
Release: 2016-07-13 17:06:53
Original
933 people have browsed it

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630483.htmlTechArticleThis tutorial is about a simple file upload and download function using the php ftp function. Okay, let’s take a look. Take a look at the simple example tutorial. This tutorial is about a simple use of php ftp function...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template