Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Latest commit

 

History

History
61 lines (42 loc) · 1.32 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.32 KB

This extension is not maintained anymore

GFtp

GFtp is a FTP extension for YII Framework.

It contains :

  • GFtpComponent : A component used to manage FTP connection and navigation (encapsulates PHP ftp method).
  • GFtpApplicationComponent : An application component that wraps FTP component.
  • GFtpWidget : A widget which can be used to display FTP folder content and allow FTP server browsing.

Installation

As many YII extension, you have to unzip archive under a subfolder of your extensions folder.

Subfolder must be named GFtp.

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');