Skip to content

popphp/pop-ftp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

pop-ftp

OVERVIEW

pop-ftp is a simple and convenient FTP adapter for processing FTP requests via PHP.

pop-ftp is a component of the Pop PHP Framework.

INSTALL

Install pop-ftp using Composer.

composer require popphp/pop-ftp

BASIC USAGE

Create a new directory, change into it and upload a file

use Pop\Ftp\Ftp;

$ftp = new Ftp('ftp.myserver.com', 'username', 'password');

$ftp->mkdir('somedir');
$ftp->chdir('somedir');

$ftp->put('file_on_server.txt', 'my_local_file.txt');

Download file from a directory

use Pop\Ftp\Ftp;

$ftp = new Ftp('ftp.myserver.com', 'username', 'password');

$ftp->chdir('somedir');

$ftp->get('my_local_file.txt', 'file_on_server.txt');