- 论坛徽章:
- 0
|
最近用perl作FTP传输的程序
需要用断点续传
但是用了rest后
如果用perl的stor函数,则can't open data connection
如果用perl的put函数, 则断点续传了,但是多传了原来已经有的文件
#######################
$filesize = $ftp->;size( @FILEQUE[$i]);
print "filesize: $filesize\n";
$ret = $ftp->;put( $localdatafile ,$datafile );
#######################
if ( $filesize >;0)
{
$ret = $ftp->;_REST( $filesize);
my $message = $ftp->;message;
print "message message\n";
print "ftp-rest: $ret\n";
}
#$ret = $ftp->;put( $localdatafile ,$datafile );
sleep( 10);
$ftp->;pasv();
$message = $ftp->;message;
print "message message\n";
#$ret = $ftp->;put( $localdatafile ,$datafile );
#$ret = $ftp->;stor( $datafile); #can't open data connection
$ret = $ftp->;_STOR(@FILEQUE[$i]);#can't open data connection
#$ret = $ftp->;put(@FILEQUE[$i]); # |
|