
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);
}
?
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...