cygnite/file 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

cygnite/file

最新稳定版本:v1.0.2

Composer 安装命令:

composer require cygnite/file

包简介

Cygnite File Component. This package use for File Upload, Image Thumbnail Creation etc.

README 文档

README

#Installation

Array Manipulator uses Composer for installation. For installing composer documentation, please refer to getcomposer.org. Add following into your composer.json.

"cygnite/file" : "1.*"

Cygnite file component handling file upload and creating thumbnail image etc.

Upload file using file component.

Example Usage:

use Cygnite\Common\File\Upload\Upload;

$status = Upload::process( function($upload)
{
	// Your code goes here
	$upload->file = 'document';
	$upload->ext = array("JPG");
	$upload->size = '32092';

	if ( $upload->save(array("destination"=> "upload", "fileName"=>"file_new_name")) ) {
		 // Upload Success
	} else {
		 // Error catch here
	}
});

// var_dump($status);

Image Cropping / Thumbnail Image:

Make thumbnail image.

Example Usage:

use Cygnite\Common\File\Thumbnail\Image;

$thumb = new Image();
$thumb->directory = 'Set your directory path';
$thumb->fixedWidth = 100;
$thumb->fixedHeight = 100;
$thumb->thumbPath = 'your thumbnail image path';
$thumb->thumbName = 'Your thumbnail image name';
// Optional. If you doen't want to have custom name then it will generate thumb as same name of original image.
$thumb->resize();

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固