gftp GFtp is a set of FTP component and widget

  1. Requirements
  2. Installation
  3. Features
  4. Usage
  5. Resources

Requirements

  • Tested on Yii 1.1.8 but it can work with previous version

Installation

  • Extract GFtp zip archive under protected/extensions/GFtp

Features

  • A Yii component : create an FTP connection everywhere in your Yii application
  • A Yii application component : create a global FTP connection
  • A widget : display and navigate through the FTP server

Usage

Here is a basic usage of GFtp extension. More samples could be found on GFtp extension website.

  • Create an FTP application component
return array(
    // [...]
    'components'=>array(
        // [...]
        'ftp' => array(
            'class' => 'ext.GFtp.GFtpApplicationComponent',
            'connectionString' => 'ftp://user:pass@host:21',
            'timeout' => 120,
            'passive' => false
        )
    ),
    // [...]
);
  • Create a local FTP component
Yii::import('ext.GFtp.GFtpComponent')

$gftp = Yii::createComponent('ext.GFtp.GFtpComponent', array(
    'connectionString' => 'ftp://user:pass@host:21', 
    'timeout' => 120, 
    'passive' => false)
);
  • Use component
$files = $gftp->ls();
$gftp->chdir('images');

Resources

4 0
8 followers
0 downloads
Yii Version: 1.1
License: LGPL-3.0
Category: Networking
Tags: ftp, yii ftp
Developed by: Herve
Created on: Oct 25, 2012
Last updated: 5 years ago

Related Extensions