LOADING STUFF...

php下连接ftp实现文件的上传、下载、删除文件实例代码

技术教程4小时前发布 北陌
21 0 0

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);

}

?

© 版权声明

相关文章

暂无评论

暂无评论...