qiniu/php-sdk
。
bash
$ composer require qiniu/php-sdk
Qiniu SDK版本 | PHP 版本 |
---|---|
7.x | cURL extension, 5.3 - 5.6,7.0 |
6.x | cURL extension, 5.2 - 5.6 |
use Qiniu\Storage\UploadManager;
use Qiniu\Auth;
...
$upManager = new UploadManager();
$auth = new Auth($accessKey, $secretKey);
$token = $auth->uploadToken($bucketName);
list($ret, $error) = $upManager->put($token, 'formput', 'hello world');
...
$ ./vendor/bin/phpunit tests/Qiniu/Tests/
详情参考代码提交指南。
The MIT License (MIT).详情见 License文件.