yii2-qiniu
, (*1)
=================================
* @author crazyfd crazyfd@qq.com, (*2)
只是因为原作者没有发布正式版本,造成了在生产环境使用困难,所以fork一份自己发布成正式版, (*3)
file upload for Yii Framework 2, (*4)
php > 5.5, (*5)
How to install?, (*6)
To use this extension, you may insert the following code:
Get it via composer by adding the package to your composer.json
:, (*7)
composer require miuhr/yii2-qiniu
Usage
<?php
$ak = 'sss';
$sk = 'sss';
$domain = 'http://demo.domain.com/';
$bucket = 'demo';
use crazyfd\qiniu\Qiniu;
$qiniu = new Qiniu($ak, $sk,$domain, $bucket);
$key = time();
$qiniu->uploadFile($_FILES['tmp_name'],$key);
$url = $qiniu->getLink($key);