承接 ijanki/ftp-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ijanki/ftp-bundle

最新稳定版本:v4.0.0

Composer 安装命令:

composer require ijanki/ftp-bundle

包简介

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

关键字:

README 文档

README

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more "classy" way.

Latest Stable Version Build Status Total Downloads License

Installation

Step 1: Install the bundle

Require the bundle with composer:

$ composer require ijanki/ftp-bundle

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new Ijanki\Bundle\FtpBundle\IjankiFtpBundle(),
    ];
}

Usage

<?php

use Ijanki\Bundle\FtpBundle\Exception\FtpException;

public function indexAction()
{
    //...
    try {
        $ftp = $this->container->get('ijanki_ftp');
    	$ftp->connect($host);
    	$ftp->login($username, $password);
    	$ftp->put($destination_file, $source_file, FTP_BINARY);

    } catch (FtpException $e) {
    	echo 'Error: ', $e->getMessage();
    }
    //...
}

All php ftp functions are wrapped in Ftp object:

For example:
ftp_mkdir becomes $ftp->mkdir or
ftp_put becomes $ftp->put
with the same arguments except the first one (resource $ftp_stream).

Check Ftp.php for other added methods.

Credits

Inspired by https://github.com/dg/ftp-php

统计信息

  • 总下载量: 666.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 4
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-19