File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
ftp /
tests /
ftp_fget_basic3.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:56 2012 UTC (12 years, 7 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Testing ftp_fget resume parameter
--CREDITS--
Rodrigo Moyle <eu [at] rodrigorm [dot] com [dot] br>
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
require 'skipif.inc';
?>
--FILE--
<?php
require 'server.inc';
$ftp = ftp_connect('127.0.0.1', $port);
ftp_login($ftp, 'user', 'pass');
if (!$ftp) die("Couldn't connect to the server");
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
file_put_contents($local_file, 'ASCIIFoo');
$handle = fopen($local_file, 'a');
var_dump(ftp_fget($ftp, $handle, 'fgetresume.txt', FTP_ASCII, 8));
var_dump(file_get_contents($local_file));
?>
--CLEAN--
<?php
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
?>
--EXPECT--
bool(true)
string(12) "ASCIIFooBar
"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>