Skip to content
A simple class for uploading files or directories via ftp.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
FTPConnection.php
README.md

README.md

FTPConnection

A simple class for uploading files or directories via ftp.

Example 1 - Single file upload:

$oFTP = new FTPConnection('sklueh.de', 'username', 'password');
var_dump($oFTP->uploadFile('testfile1.txt', 'testfile1.txt')); //true

Example 2 - Multiple file upload:

$oFTP = new FTPConnection('sklueh.de', 'username', 'password');
$aFiles = array('testfile1.txt', 'testfile2.txt', 'testfile3.txt');
var_dump($oFTP->uploadFiles($aFiles, '/my_dir/sub_dir')); //true

Example 3 - Recursive directory upload:

$oFTP = new FTPConnection('sklueh.de', 'username', 'password');
var_dump($oFTP->uploadDirectory('./example-dir1', '/')); //true

For more information visit the following link:

http://sklueh.de/2013/05/php-einfacher-ftp-upload-mit-der-klasse-ftpconnection/

You can’t perform that action at this time.