Source for file index.php
Documentation is available at index.php
ini_set('include_path', '/cvs/pear/Net_FTP:'. ini_get('include_path'));
$hostname = "example.com";
function dump ( $var, $desc = null ) {
require_once 'Net/FTP.php';
dump($ftp->setHostname ($hostname), 'FTP::setHostname()');
dump($ftp->setPort (21 ), 'FTP::setPort()');
dump($ftp->connect (), 'FTP::connect()');
dump($ftp->setUsername ($user), 'FTP::setUsername()');
dump($ftp->setPassword ($pass), 'FTP::setPassword()');
dump($ftp->login (), 'FTP::login()');
dump($ftp->pwd (), 'FTP::pwd()');
dump($ftp->cd ('test'), 'FTP::cd()');
dump($ftp->put ('proftpd-1.2.8.tar.gz', 'proftpd-1.2.8.tar.gz'), 'FTP::upload()');
dump($ftp->put ('proftpd-1.2.8.tar.gz', '../proftpd-1.2.8.tar.gz'), 'FTP::upload()');
dump($ftp->get ('proftpd-1.2.8.tar.gz', 'proftpd-1.2.8.tar.gz', true , FTP_BINARY ), 'FTP::get()');
dump($ftp->cd ('..'), 'FTP::cd()');
dump($ftp->chmodRecursive ('test', 777 ), 'FTP::chmodRecursive()');
dump($ftp->mdtm ('proftpd-1.2.8.tar.gz', 'd.m.Y'), 'FTP::mdtm()');
dump($ftp->size ('proftpd-1.2.8.tar.gz'), 'FTP::size()');
dump($ftp->rm ('test/', true ), 'FTP::rm()');
dump($ftp->disconnect (), 'FTP::disconnect()');
Documentation generated on Mon, 11 Mar 2019 10:16:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|