Kirin aa8d359662 commit | 3 anni fa | |
---|---|---|
.. | ||
docs | 3 anni fa | |
examples | 3 anni fa | |
src | 3 anni fa | |
tests | 3 anni fa | |
.gitignore | 3 anni fa | |
.scrutinizer.yml | 3 anni fa | |
.travis.yml | 3 anni fa | |
CHANGELOG.md | 3 anni fa | |
CONTRIBUTING.md | 3 anni fa | |
LICENSE | 3 anni fa | |
README.md | 3 anni fa | |
autoload.php | 3 anni fa | |
composer.json | 3 anni fa | |
phpunit.xml.dist | 3 anni fa | |
test-env.sh | 3 anni fa |
通过composer,这是推荐的方式,可以使用composer.json 声明依赖,或者运行下面的命令。SDK 包已经放到这里 qiniu/php-sdk
。
$ 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文件.