Home >php教程 >php手册 >php ftp下载文件

php ftp下载文件

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:09:39928browse

本教程是讲一个简单的用php ftp功能做文件上传下载功能哦,好了下面我们来看看简单的实例教程吧。

本教程是讲一个简单的用php ftp功能做文件上传下载功能哦,好了下面我们来看看简单的实例教程吧。

// 开始
$ret = ftp_nb_get ($my_connection, "test", "README", FTP_BINARY,
                      filesize("test"));
// 或: $ret = ftp_nb_get ($my_connection, "test", "README",
//                           FTP_BINARY, FTP_AUTORESUME);
while ($ret == FTP_MOREDATA) {

   // 可以插入其它代码
   echo ".";
   // 继续传送...
   $ret = ftp_nb_continue ($my_connection);
}
if ($ret != FTP_FINISHED) {
   echo "下载出错...";
   exit(1);
}
?> 

转载请注明:www.111cn.cn/phper/php.html

Statement:
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
Previous article:php实现在线用户计算Next article:PHP的zip 使用方法