Annotation of embedaddon/php/ext/ftp/tests/ftp_fget_basic3.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Testing ftp_fget resume parameter
3: --CREDITS--
4: Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br>
5: #testfest PHPSP on 2009-06-20
6: --SKIPIF--
7: <?php
8: require 'skipif.inc';
9: ?>
10: --FILE--
11: <?php
12: require 'server.inc';
13:
14: $ftp = ftp_connect('127.0.0.1', $port);
15: ftp_login($ftp, 'user', 'pass');
16: if (!$ftp) die("Couldn't connect to the server");
17:
1.1.1.2 ! misho 18: $local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt";
1.1 misho 19: file_put_contents($local_file, 'ASCIIFoo');
20: $handle = fopen($local_file, 'a');
21:
22: var_dump(ftp_fget($ftp, $handle, 'fgetresume.txt', FTP_ASCII, 8));
23: var_dump(file_get_contents($local_file));
24: ?>
25: --CLEAN--
26: <?php
1.1.1.2 ! misho 27: @unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt");
1.1 misho 28: ?>
29: --EXPECT--
30: bool(true)
31: string(12) "ASCIIFooBar
32: "
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>