1--TEST-- 2Testing ftp_nb_fget autoresume 3--CREDITS-- 4Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br> 5#testfest PHPSP on 2009-06-20 6--SKIPIF-- 7<?php 8require 'skipif.inc'; 9?> 10--FILE-- 11<?php 12require 'server.inc'; 13 14$ftp = ftp_connect('127.0.0.1', $port); 15ftp_login($ftp, 'user', 'pass'); 16if (!$ftp) die("Couldn't connect to the server"); 17 18$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"; 19file_put_contents($local_file, 'ASCIIFoo'); 20$handle = fopen($local_file, 'a'); 21 22var_dump(ftp_nb_fget($ftp, $handle, 'fgetresume.txt', FTP_ASCII, FTP_AUTORESUME)); 23var_dump(file_get_contents($local_file)); 24?> 25--CLEAN-- 26<?php 27@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"); 28?> 29--EXPECT-- 30int(2) 31string(12) "ASCIIFooBar 32" 33