} //--> </SCRIPT> <?php $batch = 3000; //每一批次处理行数 $startline = $_GET['startline']; //起始行 $_POST = unserialize(stripslashes($_COOKIE['POST_VARS'])); rptout("开始文件传输...\n"); //ftp_pasv($conn_id, true); $ftp = new FTP(); if (!$ftp->connect($_POST['server'], $_POST['port'])) { die($ftp->error()); } echo nl2br($ftp->greet()); $ftp->login($_POST['user'], $_POST['pass']); echo "<br>"; echo $ftp->error(); echo "<br>"; echo nl2br($ftp->features()); $ftp->setType('FTP_BINARY'); echo "<br>Connect Ok<br>"; $fp_list = fopen('migtask.txt', 'r'); for ($i = 1; $i < $startline; $i++) { fgetline($fp_list); } //跳至起始行 $session_count = 0; while ($buffer = fgetline($fp_list)) { $startline++;